Updated: 2/24/2021, 3:51:59 PM
Created: 2/24/2021, 3:51:59 PM
Last Updated By: Daniel Klein
Read Time: 1 minute(s)
The WSETCOOKIE subroutine will set a cookie to be sent back to the browser.
# Command Syntax
# *Syntax Elements
|NAME||Name of the cookie you want to set|
|VALUE||Value you wish to set the cookie to|
|EXPDATE||Date you wish the cookie to expire on. Use pick internal dates.|
|EXPTIME||Time you wish the cookie to expire (used with EXPDATE). Use pick internal times.|
|PATH||Path you wish the cookie to apply to. Use "/" for all.|
|DOMAIN||Domain you wish the cookie to apply to. Use "." for domain called from.|
|SECURE||If set to "Y" then this cookie will only save on HTTPS requests.|
The WSETCOOKIE command basically builds a Set-Cookie header. This function properly formats the Set-Cookie for you and understands Pick date and time formats.
If you wish more control you can use the WSETHEADER and build your own Set-Cookie line.
Here is a link for information on how Set-Cookie works.