External Interfaces > Reality Web Services > Outgoing Web Services > RHTTP_INIT_REQUEST Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

RHTTP_INIT_REQUEST function (DataBasic) (webservices_api_request.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

RHTTP_INIT_REQUEST Function

Returns a newly-initiated HTTP request string.

Syntax

RHTTP_INIT_REQUEST(host, port, https)

Syntax Elements

hostDNS name or IP address of the host.

portPort number to be accessed (if none, defaults to 80).

httpsSet to non-zero to enable HTTPS data encryption.

Return Value

The new request has only the following HTTP headers set:

User-Agent: Reality
Host: host
Accept-Language: en-us
Connection: close

Operation

Ultimately, requests are handles to connections to HTTP servers. They are used to hold a connection's context including the HTTP request and response headers. Although initialising a request is not strictly required, it enables the HTTP request headers to be modified by using calls to RHTTP_SET_HEADER.

The request is considered active after being used in an RHTTP_GET, RHTTP_POST, or RHTTP_SOAP_REQUEST call. It remains active until the request is used in an RHTTP_RETRIEVE or RHTTP_CLOSE call.

Requests may be freely copied, as long as they are not active. Copying an active request may cause unexpected results when trying to use the request.

A program may have multiple active requests at any one time, up to a maximum of 10.

RealityV15.0Comment on this topic