Methods

syncRequest(method:String, url:String, headers:Dictionary, body:String, fileArg:String, fileName:String, fileContent:Blob, certificate:String):Response

Sends a synchronous request.

Parameters:

method

The REST method to use (i.e. "GET", "POST", "PUT", "DELETE").

url

The full URL to send the request to, including query params.

headers

A Dictionary with the headers to use.

body

String encoded post body or null.

fileArg

Argument name of file to send in multipart requests, or null.

fileName

File name of file to send in multipart requests, or null.

fileContent

File content of file to send in multipart requests, or null.

certificate

Certificate to send in the request, or null.

Returns:

A Response object.

syncRequestWithLogger(method:String, url:String, headers:Dictionary, body:String, fileArg:String, fileName:String, fileContent:Blob, certificate:String, logger:Logger, logLevel:Null<Int>):Response

Same as syncRequest, but also allows configure logger and logLevel to use.