Fixing Timestamp type name in cookie example

This commit is contained in:
Kenneth Shaw 2017-07-09 08:44:09 +07:00
parent 1e295eddfb
commit a4589d95d6

View File

@ -71,7 +71,7 @@ func main() {
func setcookies(host string, res *string) cdp.Tasks {
return cdp.Tasks{
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").
WithExpirationDate(&expr).
WithDomain("localhost").