HTTPServerResponse.setCookie

Sets the specified cookie value.

class HTTPServerResponse
@safe
Cookie
setCookie
(
string name
,
string value
,
string path = "/"
,
Cookie.Encoding encoding = Cookie.Encoding.url
)

Parameters

name string

Name of the cookie

value string

New cookie value - pass null to clear the cookie

path string

Path (as seen by the client) of the directory tree in which the cookie is visible

encoding Cookie.Encoding

Optional encoding (url, raw), default to URL encoding

Meta