setCookie
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
Parameters
Cookie name.
Cookie value.
The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
Cookie domain.
Cookie path.
True if cookie is secure.
True if cookie is http-only.
Cookie SameSite type.
Cookie expiration date, session cookie if not set
Cookie Priority type.
True if cookie is SameParty.
Cookie source scheme type.
Cookie source port. Valid values are {-1, 1, 65535}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
Cookie partition key. If not set, the cookie will be set as not partitioned.