Method SetCookie
- Namespace
- DotNetBrowser.Cookies
- Assembly
- DotNetBrowser.dll
SetCookie(Cookie)
Sets a session cookie given explicit user-provided cookie attributes.
Task<bool> SetCookie(Cookie cookie)
Parameters
cookie
CookieAn HTTP cookie.
Returns
Remarks
If you set the cookie successfully and the method returns true
and you
decide to find the cookie in the list of all cookies, please note that
the cookie storage can modify some cookies attributes, such as domain or expiration time.
Exceptions
- ArgumentException
The
cookie
is null or the cookie cannot be set.- ObjectDisposedException
The ICookieStore has already been disposed.