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

HttpRequestSend

 
 

Library: Net, 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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

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

Copyright © Stilo Corporation, 1988-2005.