Skip to content

breeze-client / AjaxConfig

Interface: AjaxConfig ​

Defined in: src/config/interface-registry.ts:27

DataServiceAdapter Ajax request configuration

Properties ​

contentType? ​

optional contentType?: string

Defined in: src/config/interface-registry.ts:35

The Content-Type of the request body. The fetch transport sends it only for a request with a body (not GET or HEAD), defaulting to application/json.


crossDomain? ​

optional crossDomain?: string | boolean

Defined in: src/config/interface-registry.ts:37

Not used by Breeze's own transport. Set to true for the deprecated useJsonp option, for a registered ajax adapter that acts on it.


data? ​

optional data?: any

Defined in: src/config/interface-registry.ts:41

The request body. A string is sent as it is; anything else is sent as JSON.stringify(data). Ignored for GET and HEAD.


dataType? ​

optional dataType?: string

Defined in: src/config/interface-registry.ts:33

json, etc.


error ​

error: (res) => void

Defined in: src/config/interface-registry.ts:47

Called with the response when the request fails: a non-2xx status, a body that cannot be read, or no response at all (status 0).

Parameters ​

res ​

Error | HttpResponse

Returns ​

void


headers? ​

optional headers?: object

Defined in: src/config/interface-registry.ts:39

Additional request headers, merged over the Content-Type header. Breeze's own adapters do not set any.


params? ​

optional params?: object

Defined in: src/config/interface-registry.ts:43

Query-string parameters to append to url: the values given to EntityQuery.withParameters. A Date is sent as its ISO string.


success ​

success: (res) => void

Defined in: src/config/interface-registry.ts:45

Called with the response when the request succeeds: a 2xx status and a body that parses as JSON.

Parameters ​

res ​

HttpResponse

Returns ​

void


type? ​

optional type?: string

Defined in: src/config/interface-registry.ts:31

GET, POST, etc.


url ​

url: string

Defined in: src/config/interface-registry.ts:29

The request URL, without params: {serviceName}/Metadata, the save URL, or the query URL the UriBuilderAdapter built.

Released under the MIT License.