Home Manual Reference Source
import HttpJsonResponse from 'ievv_jsbase/lib/http/HttpJsonResponse'
public class | source

HttpJsonResponse

Extends:

HttpResponse → HttpJsonResponse

Extends HttpResponse with extra functionality for working with JSON response data.

The most important addition is the HttpJsonResponse#bodydata property that you will want to use instead of HttpResponse#body.

Member Summary

Public Members
public get

Get the response body (the responseText attribute of the XMLHttpRequest) decoded from JSON.

Method Summary

Public Methods
public

Overriden to make use of JSON.stringify to produce more pretty output.

Inherited Summary

From class HttpResponse
public get

body: *

Get the response body (the responseText attribute of the XMLHttpRequest).

public get

status: *

Get the status code of the response (the status attribute of the XMLHttpRequest).

public

request: *

public

Get HttpResponse#body pretty formatted.

public

Returns true if HttpResponse#status is 400 or larger and less than 500.

public

Returns true if HttpResponse#status is 0.

public

isRedirect(): *

Returns true if HttpResponse#status is 300 or larger and less than 400.

public

Returns true if HttpResponse#status is 500 or larger.

public

isSuccess(): *

Returns true if HttpResponse#status is 200 or larger and less than 300.

public

Get the response header as string.

public

Create a HttpResponseError from this HttpResponse.

public

Format as a string suitable for debugging.

Public Members

public get bodydata: * source

Get the response body (the responseText attribute of the XMLHttpRequest) decoded from JSON.

Public Methods

public getPrettyfiedBody(): * source

Overriden to make use of JSON.stringify to produce more pretty output.

Override:

HttpResponse#getPrettyfiedBody

Return:

*