Class

Response

Response(xhr)

This class wraps an XMLHttpRequest to maintain compatibility with the fetch API.
Constructor

# new Response(xhr)

Parameters:
Name Type Description
xhr XMLHttpRequest The request to be wrapped.
See:

View Source lib/client/HttpClient.ts, line 38

Methods

# json() → {any}

Returns the JSON decoded response.

View Source lib/client/HttpClient.ts, line 283

any

# parseNumericHeader(name) → {number}

Returns the response header value with the given `name` as a number. When the value is not a number the return value will be 0.
Parameters:
Name Type Description
name string The name of the header field

View Source lib/client/HttpClient.ts, line 292

number