Skip to main content

Cookies

Assembly: ServiceStack.dll
View Source
Declaration
public class Cookies : ICookies

Properties

Collection

View Source
Declaration
public List<Cookie> Collection { get; set; }

Fields

RootPath

View Source
Declaration
public const string RootPath = "/"

Methods

AddPermanentCookie(String, String, Nullable<Boolean>)

Sets a persistent cookie which never expires

View Source
Declaration
public void AddPermanentCookie(string cookieName, string cookieValue, bool? secureOnly = null)
Parameters
TypeName
System.StringcookieName
System.StringcookieValue
System.Nullable<System.Boolean>secureOnly

AddSessionCookie(String, String, Nullable<Boolean>)

Sets a session cookie which expires after the browser session closes

View Source
Declaration
public void AddSessionCookie(string cookieName, string cookieValue, bool? secureOnly = null)
Parameters
TypeName
System.StringcookieName
System.StringcookieValue
System.Nullable<System.Boolean>secureOnly

DeleteCookie(String)

Deletes a specified cookie by setting its value to empty and expiration to -1 days

View Source
Declaration
public void DeleteCookie(string cookieName)
Parameters
TypeName
System.StringcookieName

Implements