diff --git a/examples/cookie/main.go b/examples/cookie/main.go
index <HASH>..<HASH> 100644
--- a/examples/cookie/main.go
+++ b/examples/cookie/main.go
@@ -72,8 +72,8 @@ func setcookies(host string, res *string) cdp.Tasks {
 	return cdp.Tasks{
 		cdp.ActionFunc(func(ctxt context.Context, h cdptypes.Handler) error {
 			expr := cdptypes.TimeSinceEpoch(time.Now().Add(180 * 24 * time.Hour))
-			success, err := network.SetCookie(host, "cookiename", "cookievalue").
-				WithExpirationDate(&expr).
+			success, err := network.SetCookie("cookiename", "cookievalue").
+				WithExpires(&expr).
 				WithDomain("localhost").
 				WithHTTPOnly(true).
 				Do(ctxt, h)
Updating cookie example for new changed API