Print Page as PDF
HTTP Client ICR (5515)

HTTP Client    ICR (5515)

Name Value
NUMBER 5515
IA # 5515
DATE CREATED 2009/12/29
CUSTODIAL PACKAGE TOOLKIT
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE XTHC10
NAME HTTP Client
GENERAL DESCRIPTION
This API provides access to a HTTP client to retrieve
WEB pages.
STATUS Withdrawn
KEYWORDS HTTP
DURATION Till Otherwise Agreed
ID XTHC10
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
$$GETURL(URL,XT8FLG,XT8RDAT,XT8RHDR,XT8SDAT,XT8SHDR)
GETS THE DATA FROM THE PROVIDED URL USING HTTP 1.0

Return values:

<0  Error Descriptor (see the $$ERROR^XTERROR)
>0  HTTP Status Code^Description

See the http://www.faqs.org/rfcs/rfc1945.html for more details of HTTP status
codes.
VARIABLES TYPE VARIABLES DESCRIPTION
URL Input
URL (http://host:port/path)
XT8FLG Input
Timeout and flags to control processing.  If a value
of  this parameter starts from a number then this number is used as a value of
the timeout (in seconds). Otherwise, the default value of 5 seconds is used.

XT8RDAT Output
Closed root of the variable where the message body is
returned. Data is stored in consecutive nodes (numbers starting from 1). If a
line is longer than 245 characters, only 245 characters are stored in the
corresponding node. After that, overflow sub-nodes are created. For example:
;
@XT8DATA@(1)="<html>" @XT8DATA@(2)="<head><title>VistA</title></head>"
@XT8DATA@(3)="<body>" @XT8DATA@(4)="<p>" @XT8DATA@(5)="Beginning of a very
long line" @XT8DATA@(5,1)="Continuation #1 of the long line"
@XT8DATA@(5,2)="Continuation #2 of the long line" @XT8DATA@(5,...)=...
@XT8DATA@(6)="</p>"
XT8RHDR Output
Reference to a local variable where the parsed
headers are returned.  Header names are converted to upper case; the values
are left "as is". The root node contains the status line. For example:
;
XT8HDR="HTTP/1.0 200 OK" XT8HDR("CACHE-CONTROL")="private"
XT8HDR("CONNECTION")="Keep-Alive" XT8HDR("CONTENT-LENGTH")="2690"
XT8HDR("CONTENT-TYPE")="text/html" XT8HDR("DATE")="Fri, 26 Sep 2003 16:04:10
GMT" XT8HDR("SERVER")="GWS/2.1"
XT8SDAT Input
Closed root of a variable containing body of the
request message. Data should be formatted as described earlier (see the
XT8RDAT parameter).

NOTE: If this parameter is defined, not empty, and the referenced array
contains data then the POST request is generated. Otherwise, the GET request
is sent.
XT8SHDR Input
Reference to a local variable containing header
values, which will be added to the request.
DATE ACTIVATED 2009/12/29