swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

HttpObjectGetCookieAttributes

 
 

Library: Net, HTTP support (OMHTTP)
Include: omhttp.xin

Declaration

  define function HttpObjectGetCookieAttributes
              read-only   stream   HttpObject
     for      value       stream   CookieName
     into     modifiable  stream   CookieAttrs

Argument definitions

HttpObject
is an HTTP request or HTTP response object (input argument).
CookieName
is the name of the cookie (input argument).
CookieAttrs
is 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 (output argument).


Purpose

Use HttpObjectGetCookieAttributes to get the names and values of all attributes for the specified cookie in the HTTP request or response object.

Requirements

You must include the following line at the beginning of your OmniMark program:


  include "omhttp.xin"

Usage Notes

The values are returned in the stream argument as keyed items on the shelf. Usually, HttpObjectGetCookieAttributes is called in server programs.

Example

List both request cookie attributes and response cookie attributes.


  ; HttpObjectGetCookieAttributes
  include "omhttp.xin"

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

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

     output "Request cookie attributes:%n"
     repeat over request-CookieAttrs
        output key of request-CookieAttrs || "=%g(request-CookieAttrs)%n"
     again
     output "%nResponse cookie attributes:%n"
     repeat over response-CookieAttrs
        output key of response-CookieAttrs || "=%g(response-CookieAttrs)"
     again

        Other Library Functions
   HttpConnectionSendResponse
   HttpLibraryVersion
   HttpObjectGetCookieAttributes
   HttpObjectGetCookieValues
   HttpObjectGetHeaders
   HttpObjectGetStatusReport
   HttpObjectIsInError
   HttpObjectSetCookieAttribute
   HttpObjectSetCookieValue
   HttpObjectSetHeader
   HttpRequest
   HttpRequestGetSearchItems
   HttpRequestSend
   HttpRequestSetFromUrl
   HttpRequestSetProxy
   HttpRequestSetSearchItem
   HttpResponse
   HttpResponseOutput
   HttpServiceAwaitRequest
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:18 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.