5.20231.904
wijmo Interface IHttpRequestOptions Wijmo API Interface

IHttpRequestOptions Interface

Represents a set of options to be used with the httpRequest method.

Heirarchy

  • IHttpRequestOptions

Properties

Optional async

async: boolean

By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need to make synchronous requests, set this option to false.

Optional beforeSend

beforeSend: Object

Function to be called immediately before the request is sent. The function has a single parameter of type XMLHttpRequest that represents the request.

Optional complete

complete: Object

Function to be called when the request finishes (after success and error callbacks are executed). The function has a single parameter of type XMLHttpRequest that represents the request.

Optional data

data: any

Data to be sent to the server. It is appended to the url for GET requests, and converted to a JSON string for other requests.

Optional error

error: Object

Function to be called if the request fails. The function has a single parameter of type XMLHttpRequest that represents the request.

Optional method

method: string

The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). The default is "GET".

Optional password

password: string

A password to be used with XMLHttpRequest in response to an HTTP access authentication request.

Optional requestHeaders

requestHeaders: any

A JavaScript object containing key/value pairs to be added to the request headers.

Optional success

success: Object

Function to be called if the request succeeds. The function has a single parameter of type XMLHttpRequest that represents the request.

Optional timeout

timeout: number

The number of milliseconds the request can take before automatically being terminated. The default value is 0, which means there is no timeout.

Optional user

user: string

A username to be used with XMLHttpRequest in response to an HTTP access authentication request.