WSHelper.WSServerCookiesType
The WSHelper.WSServerCookiesType defines a dynamic
array for storing cookies.
WSServerCookiesType
TYPE WSServerCookiesType DYNAMIC ARRAY OF RECORD
name STRING, # Cookie name
value STRING, # Cookie value
path STRING, # Cookie path (or null)
domain STRING, # Cookie domain (or null)
expires DATETIME YEAR TO SECOND, # Cookie expiration date (or null)
httpOnly BOOLEAN,
secure BOOLEAN
sameSite STRING # Lax (default), Strict, or None (requires secure)
END RECORD
nameis the name of the cookie to be set. This field is mandatory. It will be URL-encoded on the wire.valueis the value of the cookie to be set. This field is mandatory. It will be URL-encoded on the wire.pathis the main path the cookie has to be set for. Any path containing that main path will then return the cookie. If no name is set, the cookie will be set by the path the client has provided.domainis the domain (hostname) or sub-domain (for example: .strasbourg.4js.com) the cookie will be set on client side. If not set, the domain will be the hostname provided by the client.expiresis aDATETIME YEAR TO SECOND(on local time) from when that cookie will expire, and thus not be sent by the client anymore. IfNULL, the cookie is called session cookie and will be sent as long as the client keeps the session open.http_onlyis set toTRUEif the cookie is only for the HTTP layer,FALSEif cookie can be accessible in JavaScript.secureis set toTRUEif cookie must only be sent in HTTPS,FALSEfor HTTP and HTTPS.sameSiteis the value that defines security from cross-site attacks when cookies are used. Three values are possibles for sending cookies to other sites: "Strict", "Lax", or "None". The default is "Lax". IfNULL, the default "Lax" is used.
Usage
The WSHelper.WSServerCookiesType defines a dynamic array for storing cookies
that the server sends to the client.
For examples using this record, see com.HttpServiceRequest.setResponseCookies and Examples using com.HttpServiceRequest methods.