function
Library: HTTP support (OMHTTP)
Include: omhttp.xin |
define function HttpObjectGetCookieValues read-only stream HttpObject into modifiable stream CookieValues
Argument definitions
Use HttpObjectGetCookieValues to get the names and values of all the defined cookies for the HTTP request or response object.
You must include the following line at the beginning of your OmniMark program:
include "omhttp.xin"
The values are returned in the stream argument as keyed items on the shelf. Usually, HttpObjectGetCookieValues
is part of a server program.
List request cookies, response cookies and their keys.
; HttpObjectGetCookieValues include "omhttp.xin" process local HttpRequest my-Request local HttpResponse my-Response local stream request-Cookies variable local stream response-Cookies variable HttpObjectGetCookieValues my-Request into request-Cookies HttpObjectGetCookieValues my-Response into response-Cookies output "Request cookies:%n" repeat over request-Cookies output key of request-Cookies || "=%g(request-Cookies)%n" again output "%nResponse cookies:%n" repeat over response-Cookies output key of response-Cookies || "=%g(response-Cookies)%n" again