Retrieves the data for a cookie. Alternately, can set the data for a cookie.
Synopsis
error = InetCookie(url, name, data, flags, p3p)
Args
url is the http address associated with the cookie.
name is any name of your choosing to be given the cookie. Omit this arg if you do not need a name for the cookie.
data is the name of some REXX variable where you wish the cookie's data stored. See HTTP Cookies for details about the format of cookie data.
flags specifies some options. It may be any of the following, each separated by a | character:
Value | Meaning |
---|---|
SET | Set the cookie's data. In this case, data is the data for the cookie, rather than a variable name. If SET is not specified, then InetCookie queries a cookie's value. |
THIRDPARTY | Return the cookie data only if the policy allows all cookies for the specified URL to be returned. |
RESTRICTED | Return the cookie data only if the specified URL is untrusted (that is, if it belongs to an untrusted site). |
P3P | Use Platform-for-Privacy-Protection header. |
If omitted, flags defaults to none of the above.
p3p is passed only if you specify the P3P flag. It is some string that represents a Platform-for-Privacy-Protection (P3P) header for the cookie.
Returns
An empty string if successful, or an error message if a problem.
Notes
If you're querying some cookie's data, and that cookie doesn't exist (ie, was never set), InetCookie returns an error message about "no more data".