HttpObjectGetCookieAttributes
Full Description
swirl
Syntax
  define function HttpObjectGetCookieAttributes
              read-only   stream   HttpObject
     for      value       stream   CookieName
     into     modifiable  stream   CookieAttrs


Purpose

This function returns the names and values of all attributes for the specified cookie in the HTTP request or response object. The values are returned in the stream argument as keyed items on the shelf. Usually, HttpObjectGetCookieAttributes is called in server programs.

Input arguments:

  • "HttpObject" -- an HTTP request or HTTP response object.
  • "CookieName" -- the name of the cookie.

Output arguments:

  • "CookieAttrs" -- a stream shelf containing the cookie attributes as keyed items. The contents of the shelf are cleared before the cookie attribute values are copied to it. The item key is the cookie name.

Example:

  ; HttpObjectGetCookieAttributes

  local HttpRequest my-Request
  local HttpResponse my-Response
  local stream request-CookieAttrs
  local stream response-CookieAttrs

  HttpObjectGetCookieAttributes my-Request
     for "DocUserId" into request-CookieAttrs
  HttpObjectGetCookieAttributes my-Response
     for "DocUserId" into response-CookieAttrs

  repeat over request-CookieAttrs
     output "%g(request-CookieAttrs)%n"
  again
  repeat over response-CookieAttrs
     output "%g(response-CookieAttrs)%n"
  again

Copyright © OmniMark Technologies Corporation, 1988-1998.