HttpObjectSetHeader
Full Description
swirl
Syntax
  define function HttpObjectSetHeader
                 modifiable  stream   HttpObject
     for         value       stream   HeaderName
     to          value       stream   HeaderValue
     append      value       switch   AppendMode  optional initial {true}


Purpose

This function sets a named header value in an HTTP request or response object. It can be called from either a client or a server program.

Input arguments:

  • "HttpObject" -- an HTTP request or HTTP response object.
  • "HeaderName" -- the name of the header.
  • "HeaderValue" -- the value to assign to the header.
  • "AppendMode" -- an optional argument that specifies whether the value should be appended to any existing value. Header values are appended by default.

Example:

  ; HttpObjectSetHeader

  local HttpRequest my-Request
  local HttpResponse my-Response

  HttpObjectSetHeader my-Request for "User-Agent" to "omHTTP"
  HttpObjectSetHeader my-Response for "Accept" to "*/*"

Copyright © OmniMark Technologies Corporation, 1988-1998.