Skip to content
Ron Buckton edited this page Jan 15, 2015 · 1 revision

Contains the details of the response of an asynchronous HTTP request.

Synatx

export class HttpResponse {
  constructor(request: HttpRequest, xhr: XMLHttpRequest);
  public request: HttpRequest;
  public status: number;
  public statusText: string;
  public responseText: string;
  public responseObject: any;
  public getAllResponseHeaders(): string;
  public getResponseHeader(header: string): string;
}

Constructors

new HttpResponse(HttpRequest,XMLHttpRequest)
Creates a new HttpResponse

Properties

request
Gets the request for this response
status
Gets the status code for the response
statusText
Gets the status text for the response
responseText
Gets the response text of the response
responseObject
Gets the response object for the response

Methods

getAllResponseHeaders()
Gets all of the response headers in a single string
getResponseHeader(String)
Gets the value for the named response header

Requirements

  • Supported Platforms: Browser
  • Module: httpclient
  • Library: httpclient.ts

See Also

Clone this wiki locally