Fixing Timestamp type name in cookie example
This commit is contained in:
parent
1e295eddfb
commit
a4589d95d6
|
@ -71,7 +71,7 @@ func main() {
|
||||||
func setcookies(host string, res *string) cdp.Tasks {
|
func setcookies(host string, res *string) cdp.Tasks {
|
||||||
return cdp.Tasks{
|
return cdp.Tasks{
|
||||||
cdp.ActionFunc(func(ctxt context.Context, h cdptypes.Handler) error {
|
cdp.ActionFunc(func(ctxt context.Context, h cdptypes.Handler) error {
|
||||||
expr := cdptypes.Timestamp(time.Now().Add(180 * 24 * time.Hour))
|
expr := cdptypes.TimeSinceEpoch(time.Now().Add(180 * 24 * time.Hour))
|
||||||
success, err := network.SetCookie(host, "cookiename", "cookievalue").
|
success, err := network.SetCookie(host, "cookiename", "cookievalue").
|
||||||
WithExpirationDate(&expr).
|
WithExpirationDate(&expr).
|
||||||
WithDomain("localhost").
|
WithDomain("localhost").
|
||||||
|
|
Loading…
Reference in New Issue
Block a user