Updating cookie example for new changed API
This commit is contained in:
parent
b2d9420f0c
commit
b6cbbcbe03
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user