Cookie
Wisej.Base.Cookie
Namespace: Wisej.Base
Assembly: Wisej.Framework (4.0.0.0)
Represents an individual HTTP cookie.
public class CookiePublic Class CookieConstructors
Cookie()
Creates a new instance of Cookie.
Cookie(name, value)
Creates a new instance of Cookie.
Cookie(name, value, domain)
Creates a new instance of Cookie.
Cookie(name, value, expires)
Creates a new instance of Cookie.
Cookie(name, value, domain, expires)
Creates a new instance of Cookie.
Properties
Domain
String: Returns or sets the domain to associate the cookie with.
Expires
DateTime: Returns or sets the expiration date and time for the cookie.
HttpOnly
Boolean: Returns or sets whether the cookie cookie is a cookie that has the HttpOnly attribute, which prevents client-side scripts from accessing the cookie's data. Since 4.0.0
Cookies with the HttpOnly attribute set to true can only be created during the handling of an HTTP request; it is not possible to set an HttpOnly cookie during a WebSocket request. If you need to create an HttpOnly cookie while using WebSocket, you must do so during the initial execution of Program.Main(). You can determine whether the application is responding to an HTTP or WebSocket request by examining the Application.IsWebSocket property.
Name
String: Returns or sets the name for the Cookie.
Path
String: Returns or sets the path of the Cookie.
SameSite
SameSiteMode: Returns or sets the value for the SameSite attribute of the cookie. The default value is Unspecified.
Secure
Boolean: Returns or sets whether to transmit the cookie using Secure Sockets Layer (SSL)--that is, over HTTPS only.
Value
String: Returns or sets an individual cookie value.
Methods
ToServerString()
Returns the string representation of the cookie.
Returns: String.
Last updated
Was this helpful?

