RestRequest

constructor(method: RestRequest.RestMethod, path: String)

Generic constructor for arbitrary requests without a body.

Parameters

method

HTTP method used in the request (GET/POST/DELETE etc).

path

URI path. This is automatically resolved against the user's current instance host.


constructor(method: RestRequest.RestMethod, path: String, additionalHttpHeaders: Map<String, String>)

Generic constructor for arbitrary requests without a body.

Parameters

method

HTTP method used for the request (GET/POST/DELETE etc).

path

URI path. This will automatically be resolved against the user's current instance host.

additionalHttpHeaders

Additional headers.


constructor(method: RestRequest.RestMethod, path: String, requestBody: RequestBody)

Generic constructor for arbitrary requests.

Parameters

method

HTTP method used for the request (GET/POST/DELETE etc).

path

URI path. This will automatically be resolved against the user's current instance host.

requestBody

Request body, if one exists. Can be null. Note: Do not use this constructor if requestBody is not null and you want to build a batch or composite request.


constructor(method: RestRequest.RestMethod, path: String, requestBodyAsJson: JSONObject)

Generic constructor for arbitrary requests.

Parameters

method

HTTP method used for the request (GET/POST/DELETE etc).

path

URI path. This will automatically be resolved against the user's current instance host.

requestBodyAsJson

Request body as JSON, if one exists. Can be null. Note: Use this constructor if requestBody is not null and you want to build a batch or composite request.


constructor(method: RestRequest.RestMethod, path: String, requestBody: RequestBody, additionalHttpHeaders: Map<String, String>)

Generic constructor for arbitrary requests.

Parameters

method

HTTP method used for the request (GET/POST/DELETE etc).

path

URI path. This will automatically be resolved against the user's current instance host.

requestBody

Request body, if one exists. Can be null.

additionalHttpHeaders

Additional headers. Note: Do not use this constructor if requestBody is not null and you want to build a batch or composite request.


constructor(method: RestRequest.RestMethod, path: String, requestBodyAsJson: JSONObject, additionalHttpHeaders: Map<String, String>)

Generic constructor for arbitrary requests.

Parameters

method

HTTP method used for the request (GET/POST/DELETE etc).

path

URI path. This will automatically be resolved against the user's current instance host.

requestBodyAsJson

Request body as JSON, if one exists. Can be null.

additionalHttpHeaders

Additional headers. Note: Use this constructor if requestBody is not null and you want to build a batch or composite request.


constructor(method: RestRequest.RestMethod, endpoint: RestRequest.RestEndpoint, path: String, requestBody: RequestBody, additionalHttpHeaders: Map<String, String>)

Generic constructor for arbitrary requests.

Parameters

method

HTTP method used for the request (GET/POST/DELETE etc).

endpoint

The endpoint associated with the request.

path

URI path. This will be resolved against the user's current Rest endpoint, as specified by the endpoint parameter.

requestBody

Request body, if one exists. Can be null.

additionalHttpHeaders

Additional headers.


constructor(method: RestRequest.RestMethod, endpoint: RestRequest.RestEndpoint, path: String, requestBodyAsJson: JSONObject, additionalHttpHeaders: Map<String, String>)

Generic constructor for arbitrary requests.

Parameters

method

HTTP method used for the request (GET/POST/DELETE etc).

endpoint

The endpoint associated with the request.

path

URI path. This will be resolved against the user's current Rest endpoint, as specified by the endpoint parameter.

requestBodyAsJson

Request body as JSON, if one exists. Can be null.

additionalHttpHeaders

Additional headers.