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
cookieCookieAn 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
cookieis null or the cookie cannot be set.- ObjectDisposedException
The ICookieStore has already been disposed.