HttpObjectGetHeaders
Full Description
swirl
Syntax
  define function HttpObjectGetHeaders
              read-only   stream   HttpObject
     into     modifiable  stream   Headers


Purpose

This function returns the names and values of all headers defined for the HTTP request or response object. The values are returned as keyed items in a stream shelf. HttpObjectGetHeaders is called usually in a server program.

Input argument:

  • "HttpObject" -- an HTTP request or HTTP response object.

Output argument:

  • "Headers" -- a returned shelf containing the headers as keyed items. The contents of the shelf are cleared before the headers are copied to it. The item key is the header name.

Example:

  ; HttpObjectGetHeaders

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

  HttpObjectGetHeaders my-Request into request-Headers
  HttpObjectGetHeaders my-Response into response-Headers

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

Copyright © OmniMark Technologies Corporation, 1988-1998.