HTTP Request Library Object
The HTTP Request functions enable you to invoke Web service requests.
For an example of working with these functions, see Using the HTTP Request Functions.
The business entities in this library are exposed under Business Entities > Library Types > Communication> HTTP Request.
The functions are exposed under Project > References > Library References > Direct.Common > HTTP Request.
Before you use these functions, create an instance of the HTTP Request business entity. Enter the values in the required parameters to invoke the web service request.
Name |
input type |
description |
---|---|---|
Accept Property Header | Text | Specify the media types that are acceptable for the response. |
Authentication Type |
Text |
The authentication mechanism supported by the Web service. The supported authentication types are:
|
Auto Redirect |
Boolean | Indicates if automatic redirection of the Web request is enabled or disabled. |
Content Type |
Text | The content type for the Web request. |
Inbound Encoding |
Text | The encoding type for an incoming response. |
Outgoing Encoding |
Text | The encoding type for an outgoing request. |
Password |
Text | The password to connect to the Web server. |
Proxy Port |
Number | The port of the proxy server. |
Proxy Server |
Text | The URL of the proxy server. |
Request Body |
Text |
The body of the Web service request. |
Request Method |
Text |
The Request method for the Web service request. |
Response |
Text |
The Response to the Web service request. |
Response Headers |
List of Key-Value pair |
The HTTP response headers. |
Status | Text | Indicates the status of the Web service request. |
Timeout |
Number |
The Web server connection timeout time. |
URL |
Text |
The URL of the Web server. |
User Agent |
Text |
A user agent string containing properties of the Request user's system. |
User Name |
Text |
The username to connect to the Web server. |
Windows Authentication |
Boolean |
Indicates if the use of Windows authentication to connect to the Web server in enabled or disabled. |
The events of HTTP Request library are listed below:
Events | Description |
---|---|
Async Callback | This event is raised when the execution of Post Request Asynchronously is completed. |
Exception | This event is raised when an HTTP request gets an exception, after the request is sent to the server. |
The functions of HTTP Request library are listed below:

Adds a specified header with a specified value, to the HTTP Request.
HTTP headers enable the client and the server to pass additional information with the request or the response. Common HTTP response headers include Accept, Connection, and Date.
Parameter | Input | Description |
---|---|---|
Header |
Text |
The Header to add to the Web service request. |
Value |
Text |
The Header value. |
Returns
Does not return any value.

Aborts the asynchronous request. This can be used to abort the request that is taking a long time to process.
Parameter | Input | Description |
---|---|---|
Request ID |
Text |
ID of the Web service request. |
Returns
Does not return any value.

Returns the value of the specified header of a response.
Parameter | Input | Description |
---|---|---|
Header |
Text |
The header from which you want the response value. |
Returns
Returns the response value of the specified header as text.

Posts the HTTP request to the Web server. This function does not use any parameters.
Returns
Returns True if the request was sent successfully, else returns False.

Posts the HTTP request to the Web server asynchronously. This function does not use any parameters.
Returns
Returns Request ID.

Removes all the headers and header values from the HTTP request.
Returns
Returns True if all the headers were successfully removed, else returns False.

Removes a header from the HTTP request.
Parameter | Input | Description |
---|---|---|
Header |
Text |
The name of the header to remove from the HTTP request. |
Returns
Does not return any value.

Retrieves all the headers and the header values from the HTTP request. This function does not use any parameters.
Returns
Returns all headers and header values as a List of Text.

Specifies the path of the certificate to send with the HTTP request for authentication, along with the password for the certificate.
Parameter | Input | Description |
---|---|---|
Path |
Text |
Path of the certificate. |
Password |
Text |
Password for the certificate. |
Returns
Does not return any value.

Specifies the path of the certificate to send with the HTTP request for authentication. The password is fetched automatically from the local machine certificate store.
Parameter | Input | Description |
---|---|---|
Path |
Text |
Path of the certificate. |
Returns
Does not return any value.

Updates the header value in a header of the HTTP request.
Parameter | Input | Description |
---|---|---|
New Value |
Text |
The new value to add to the header. |
Header |
Text |
The name of the header to which to add the new value. |
Returns
Returns True if the header value is updated, else returns False.