The HTTPClient object is a base object for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. Compared to the Inet object, the HTTPClient object is easier to use and supports more methods (Get/Post/Put/Delete) and more SSL protocols (TLS 1.0, TLS 1.1, TLS 1.2, SSL 2.0, and SSL 3.0).
Note
This object cannot be referenced in .NET Web Service and .NET Assembly components, otherwise the component will fail to be deployed.
HTTPClient property |
Datatype |
Description |
---|---|---|
Boolean |
Whether the program reads the response body automatically. |
|
Integer |
The secure protocol. |
|
Long |
The timeout seconds. |
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing information about the class definition of the object or control. |
HTTPClient event |
Occurs |
---|---|
Constructor in PowerScript Reference |
Immediately before the Open event occurs in the window. |
Destructor in PowerScript Reference |
Immediately after the Close event occurs in the window. |
HTTPClient function |
Datatype returned |
Description |
---|---|---|
ClassName in PowerScript Reference |
String |
Returns the name assigned to the object. |
ClearRequestHeaders in PowerScript Reference |
Integer |
Clears the headers of the request. |
GetContextService in PowerScript Reference |
Integer |
Creates a reference to a context-specific instance of the specified service. |
GetParent in PowerScript Reference |
PowerObject |
Returns a reference to the name of the parent object. |
GetRequestHeader in PowerScript Reference |
String |
Gets the request header by name. |
GetRequestHeaders in PowerScript Reference |
String |
Gets all of the request headers' information. |
GetResponseBody in PowerScript Reference |
Integer |
Gets the response body. |
GetResponseHeader in PowerScript Reference |
String |
Gets the response header by name. |
GetResponseHeaders in PowerScript Reference |
String |
Gets all of the response headers' information. |
GetResponseStatusCode in PowerScript Reference |
Long |
Gets the response status code. |
GetResponseStatusText in PowerScript Reference |
String |
Gets the response status description. |
PostData in PowerScript Reference |
Integer |
Sends the data with POST method. |
PostDataEnd in PowerScript Reference |
Integer |
Finishes sending the data with POST method. |
PostDataStart in PowerScript Reference |
Integer |
Starts sending the data with POST method. |
PostEvent in PowerScript Reference |
Boolean |
Adds an event to the end of the message queue for the object. |
ReadData in PowerScript Reference |
Integer |
Reads the response body. |
SendRequest in PowerScript Reference |
Integer |
Sends the request to the server. |
SetRequestHeader in PowerScript Reference |
Integer |
Sets the request header. |
SetRequestHeaders in PowerScript Reference |
Integer |
Sets all of the request headers' information. |
TriggerEvent in PowerScript Reference |
Integer |
Triggers a specific event in the object and executes the script for the event. |
TypeOf in PowerScript Reference |
Object |
Returns the type of the object. |