swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     Other Library Functions  
function  

HttpRequestSend

 
 

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

Declaration

define function HttpRequestSend
            modifiable  HttpRequest Request
   into  modifiable   HttpResponse  Response
   timeout  value       integer Timeout optional initial {10000}

Argument definitions

Request
is an HTTP request object.
Response
is the HTTP response object.
Timeout
is the maximum number of milliseconds to wait for a communication operation before failing.


Purpose

Use HttpRequestSend to construct an HTTP message from an HTTP request object and send it from the client to the server. HttpRequestSend then waits for the server response that is then used to populate the HTTP response object argument.

Requirements

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

  include "omhttp.xin"

Usage Notes

Request is set to an error state if the TCP connection times out.

Response's object values are reset to their default values before being updated by the transaction.

Example


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

    Related Syntax
   HttpRequestSetFromUrl
   HttpObjectIsInError
   HttpObjectGetStatusReport
 
  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 ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.