Inserting, Listing, and Deleting Cookies
%Net.HttpRequestOpens in a new tab automatically manages cookies sent from the server; if the server sends a cookie, your instance of %Net.HttpRequestOpens in a new tab will return this cookie on the next request. (For this mechanism to work, you need to reuse the same instance of %Net.HttpRequestOpens in a new tab.)
Use the following methods to manage cookies within your instance of %Net.HttpRequestOpens in a new tab:
InsertCookie()
Inserts a cookie into the request. Specify the following arguments:
-
Name of the cookie.
-
Value of the cookie.
-
Path where the cookie should be stored.
-
Name of the machine from which to download the cookie.
-
Date and time when the cookie expires.
GetFullCookieList()
Returns the number of cookies and returns (by reference) an array of cookies.
DeleteCookie()
Deletes a cookie from the request.
Remember that cookies are specific to an HTTP server. When you insert a cookie, you are using a connection to a specific server, and the cookie is not available on other servers.
For details on these methods, see the class documentation for %Net.HttpRequestOpens in a new tab.