Skip to content

Interface: TransportResponse ​

Defined in: core/src/transport/types.ts:28

What a transport resolves with. Any HTTP status, even 4xx or 5xx, is a response.

Properties ​

PropertyTypeDescriptionDefined in
bodyunknownParsed JSON when the response is JSON (when content-type contains application/json), else the text.core/src/transport/types.ts:32
error?"network" | "timeout" | "abort" | "stalled"Set when no HTTP response arrived ('stalled' is set by core for a request it aborted).core/src/transport/types.ts:36
header(name) => string | nullResponse header lookup (Retry-After).core/src/transport/types.ts:34
statusnumberHTTP status; 0 when no response arrived (error is then set).core/src/transport/types.ts:30
xhr?XMLHttpRequestThe built-in transport's request object (passed to the error event).core/src/transport/types.ts:38

Released under the MIT License.