Adds a Set-Cookie header to the response using the indicated Name. The cookie's value and optional attributes will automatically be included as indicated by each argument.


Response = HTTP_Services('SetCookie', Name, Value, Expires, MaxAge, Domain, Path, Secure, HttpOnly, Extension)




NameName of the cookie. Required
ValueValue for the cookie. If empty, only the Name will be sent. Optional


Date the cookie should expire. Should use RFC1123 formatting. For example:

"Sun, 06 Nov 1994 08:49:37 GMT"

If a number is passed in, the system will assume this is an an internal date or datetime and attempt to convert it to RFC1123 formatting. Optional

MaxAgeNumber of seconds that the cookie should remain alive. Optional
DomainHosts to which the cookie will be sent. For example, "", "", or "" Optional
PathScope of the cookie. For example, "/api/reports" or "/api/users". Optional
SecureBoolean flag to indicate that the "Secure" attribute should be included. Optional
HttpOnlyBoolean flag to indicate that the "HttpOnly" attribute should be included. Optional
ExtensionAny other content to include in the cookie. May or may not be name/value paired. Optional


This service is a wrapper around the SetResponseHeaderField service. Each cookie with a unique name will have its own Set-Cookie response header.

  • No labels