HttpResponse

built-in shelf

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


Purpose

The HttpResponse object is a keyed shelf that contains information that an HTTP server will return to a client after receiving a request.

Usage Notes

You can create as many instances of the HttpResponse component as you require by declaring global and local variables of type "httpResponse". To use httpResponse components in your program, you must also include the following include statement in your program:

     include "omhttp.xin"

The HTTP response shelf contains the information needed to construct an HTTP-formatted response message that an HTTP server will return to a client after receiving a request. The HTTP response shelf contains the following keyed items:

Related omhttp - HTTP support library functions:

Example


  ; HttpRequestSend
   include "omhttp.xin"
  
  process
  
     local HttpRequest my-Request
     local HttpResponse get-Response
  
     HttpRequestSetFromUrl my-Request
        from "http://www.omnimark.com/whats-new.html"
  
     HttpRequestSend my-Request into get-Response timeout 60000
  
     output get-Response{"entity-body"}