HttpRequestSend
Full Description
swirl
Syntax
  define function HttpRequestSend
              modifiable   stream  Request
     into  modifiable  stream  Response
     timeout  value       counter Timeout optional initial {10000}


Purpose

This function constructs an HTTP message from an HTTP request object and sends it from the client to the server. The function waits for the server response that is then used to populate the HTTP response object argument.

Input arguments:

  • "Request" -- an HTTP request object.
  • "Timeout" -- the maximum number of milliseconds to wait for a communication operation before failing. "Request" is set to an error state if the TCP connection times out.

Output argument:

  • "Response" -- the HTTP response object. The object values are reset to their default values before being updated by the transaction.

Example:

  ; HttpRequestSend 

  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"

Copyright © OmniMark Technologies Corporation, 1988-1998.