breeze-client / HttpResponse
Interface: HttpResponse
Defined in: src/manager/entity-manager.ts:30
The response to one HTTP request Breeze made, as its data service adapter received it. Found on ServerError.httpResponse, QueryResult.httpResponse and SaveResult.httpResponse.
Properties
config
config:
any
Defined in: src/manager/entity-manager.ts:33
The request that was sent: its AjaxConfig without the callbacks - url, type (the HTTP method), params, data, headers and so on.
data
data:
any
Defined in: src/manager/entity-manager.ts:36
The response body: the parsed JSON of a successful response, or the text of a failed one. Null when the request failed before any response arrived, or its body could not be read.
error?
optionalerror?:any
Defined in: src/manager/entity-manager.ts:39
Set only when the request failed: the error the transport threw if the request could not be completed or its body could not be read, otherwise the status text.
saveContext?
optionalsaveContext?:any
Defined in: src/manager/entity-manager.ts:43
Set by Breeze on the response to a save request, where it is used to turn the server's per-entity errors into EntityErrors. Undefined for queries and metadata requests. Applications do not normally need it.
status
status:
number
Defined in: src/manager/entity-manager.ts:46
The HTTP status code. 0 when the request failed before any response arrived: offline, DNS, CORS, a server that is down, or an aborted request.
statusText?
optionalstatusText?:string
Defined in: src/manager/entity-manager.ts:49
The HTTP status text, such as "Not Found". Empty when the server sent none (HTTP/2 never does), and set to the transport's error message when the request failed before any response arrived. May be absent with a custom ajax adapter.
Methods
getHeaders()
getHeaders(
headerName):string
Defined in: src/manager/entity-manager.ts:53
Returns the value of the named response header, or null if the response did not include it. Called with an empty name, returns an object holding every header, keyed by lower-case name. When no response arrived, returns "" for a name and {} without one.
Parameters
headerName
string
Returns
string