OAuthRequest object

The OAuthRequest object can use the access token to obtain each property of the HTTP request of the protected resource, including the server address, the request header, the secure protocol, the timeout value etc.

Properties

OAuthRequest property

Datatype

Description

ClassDefinition

PowerObject

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

Method

String

HTTP method for sending authentication requests. Values are:

GET – HTTP get method;

POST – HTTP post method.

SecureProtocol

Integer

Specifies the secure protocol with the integer value. Values are:

0 – All secure protocols. This is a default value;

1 – TLS1.0;

2 – TLS1.1;

3 – TLS1.2.

Timeout

Long

Specifies the timeout seconds. The default value is 60 and 0 indicates no timeout.

URL

String

Specifies the request URL.


Functions

OAuthRequest function

Datatype returned

Description

ClassName in PowerScript Reference

String

Returns the name assigned to the object.

ClearHeaders in PowerScript Reference

Integer

Clears the headers of the request.

GetBody in PowerScript Reference

Integer

Gets the body into string.

GetContextService in PowerScript Reference

Integer

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

GetHeader in PowerScript Reference

String

Gets the request header by name.

GetHeaders in PowerScript Reference

String

Gets the header of all of the requests.

GetParent in PowerScript Reference

PowerObject

Returns a reference to the name of the parent object.

SetAccessToken in PowerScript Reference

Integer

Sets the access token.

SetBody in PowerScript Reference

Integer

Sets the request body.

SetHeader in PowerScript Reference

Integer

Sets the request header.

SetHeaders in PowerScript Reference

Integer

Sets the header information of all of the requests.

TypeOf in PowerScript Reference

Object

Returns the type of the object.