Interface ICookieAccessor
Accessor for cookie handling methods.
public interface ICookieAccessor
- Extension Methods
Methods
Get(string)
Returns value of a specified cookie.
string Get(string name)
Parameters
namestringName of the cookie.
Returns
- string
Value of the cookie if the cookie exists, null otherwise.
Remove(string)
Removes the specified cookie.
void Remove(string name)
Parameters
namestringName of the cookie.
Set(string, string, CookieOptions)
Sets the value of a cookie.
void Set(string name, string value, CookieOptions cookieOptions = null)
Parameters
namestringName of the cookie.
valuestringValue of the cookie.
cookieOptionsCookieOptionsA Microsoft.AspNetCore.Http.CookieOptions object for further cookie customization.