From b6cbbcbe0381881e25336acaa16f8e6122a91296 Mon Sep 17 00:00:00 2001 From: Kenneth Shaw Date: Mon, 21 Aug 2017 07:10:42 +0700 Subject: [PATCH] Updating cookie example for new changed API --- examples/cookie/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cookie/main.go b/examples/cookie/main.go index ff3f7d9..c9a1376 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)