Interface: AjaxRequest

jrt.AjaxRequest

Properties for an Ajax request (see jrt.Ajax).

Members

background :boolean|undefined

If this is false or undefined, the UI is disabled until a response is received.

Type:
  • boolean | undefined

baseUrl :string

The target URL results from concatenating baseURL, servicePath and serviceName.

Type:
  • string

formData :FormData|undefined

The request parameters as a FormData object. If both 'params' and 'formData' are specified in a request, then all their values are sent together.

Type:
  • FormData | undefined

method :string|undefined

The method can be "GET" (the default), "POST", "PUT", "PATCH", "DELETE" and "HEAD".

Type:
  • string | undefined

params :?Object.<!jrt.AjaxRequestValue>|undefined

The request parameters as a plain object.

Type:

responseType :string|undefined

The response type is inferred from the response's content type by default, but you set this property to override it (it can be any type allowed by XMLHttpRequest).

Type:
  • string | undefined

safe :boolean|undefined

This property is only used when the app version is "TEST". When this is the case, all unsafe requests are simulated with a successful empty response. By default only "GET" and "HEAD" requests are considered safe, but you can override this by setting this property.

Type:
  • boolean | undefined

serviceName :string|undefined

See baseUrl.

Type:
  • string | undefined

servicePath :string|undefined

See baseUrl.

Type:
  • string | undefined

timeout :number|undefined

The response timeout in milliseconds (the default is 30000). Specify 0 for no timeout.

Type:
  • number | undefined

xhr :XMLHttpRequest|undefined

Type:
  • XMLHttpRequest | undefined