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 have no more than 2 levels, and the top-level must be arrays, the second-level must be objects.

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

SecureProtocol

Integer

The secure protocol.

TimeOut

Long

The timeout seconds.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control


Events

RESTClient event

Occurs

Constructor

When the object is created

Destructor

When the object is destroyed


Functions

RESTClient function

Datatype returned

Description

ClassName

String

Returns the name assigned to the object

ClearRequestHeaders

Integer

Clears headers of the request.

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service

GetParent

PowerObject

Returns a reference to the name of the parent object

GetRequestHeader

String

Gets the request header by name.

GetRequestHeaders

String

Gets all of the request headers information.

GetResponseBody

Integer

Gets the response body into a string or blob value.

GetResponseHeader

String

Gets the response header by name.

GetResponseHeaders

String

Gets all of the response headers information.

GetResponseStatusCode

Long

Gets the response status code.

GetResponseStatusText

String

Gets the response status description.

PostEvent

Boolean

Adds an event to the end of the message queue for the object

Retrieve

Long

Retrieves data to the DataWindow.

SendRequest

Integer

Sends the request from the RESTClient object to the server.

SetRequestHeader

Integer

Sets the request header.

SetRequestHeaders

Integer

Sets all of the request headers information.

Submit

Integer

Sends the data to the server via the HTTP POST method.

TriggerEvent

Integer

Triggers a specific event in the object and executes the script for the event

TypeOf

Object

Returns the type of the object