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 39

Methods

# json() → {any}

Returns the JSON decoded response.

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

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 303

number