RESTClient object
The RESTClient object provides the ability to access the RESTful Web
APIs. It loads the JSON-formatted string returned from the RESTful Web
Service APIs into the DataWindow object. The JSON string returned from the
RESTFul Web Service APIs must be in the format described in the section called “Supported JSON formats” in Application Techniques.
The RESTClient object supports compression for the downloaded data,
but not for the uploaded data. If the data received from the RESTful web
service is compressed as gzip, it will be automatically decompressed. Only
gzip compression format is supported at this moment. The developer can use
the SetRequestHeader function to set the Accept-Encoding header to allow
only the gzip compression format.
Note
This object cannot be referenced in .NET Web Service or .NET
Assembly components, otherwise the component will fail to be
deployed.
Note
DataWindow object with the following presentation styles are
unsupported: Composite, Crosstab, OLE 2.0, and RichText.
Properties
|
RESTClient property |
Datatype |
Description |
|---|---|---|
|
Integer |
The secure protocol. |
|
|
Long |
The timeout seconds. |
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
Events
|
RESTClient event |
Occurs |
|---|---|
|
When the object is created |
|
|
When the object is destroyed |
Functions
|
RESTClient function |
Datatype returned |
Description |
|---|---|---|
|
String |
Returns the name assigned to the |
|
|
Integer |
Clears headers of the request. |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Integer |
Gets the JWT token using the POST |
|
|
Integer |
Gets the OAuth 2.0 access token. |
|
|
String |
Gets the request header by name. |
|
|
String |
Gets all of the request headers |
|
|
String |
Gets the response header by name. |
|
|
String |
Gets all of the response headers |
|
|
Long |
Gets the response status code. |
|
|
String |
Gets the response status |
|
|
Boolean |
Adds an event to the end of the message queue for |
|
|
Long |
Retrieves data to the DataWindow, DataWindowChild, |
|
|
Long |
Retrieves one data row to the DataWindow, |
|
|
Integer |
Sends the HTTP DELETE request to the server and |
|
|
Integer |
Sends the HTTP GET request to the server and then |
|
|
Integer |
Sends the HTTP PATCH request to the server and then |
|
|
Integer |
Sends the HTTP POST request to the server and then |
|
|
Integer |
Sends the HTTP PUT request to the server and then |
|
|
Integer |
Sets the JWT token string to the HTTP request |
|
|
Integer |
Sets the OAuth 2.0 token string to the HTTP request |
|
|
Integer |
Sets the request header. |
|
|
Integer |
Sets all of the request headers |
|
|
Integer |
Sends the data to the server via the HTTP POST |
|
|
Integer |
Triggers a specific event in the object and |
|
|
Object |
Returns the type of the object. |