# Class webdriver.http.Response

code »

Represents a HTTP response.

## Constructor

webdriver.http.Response ( status, headers, body )

Parameters

status: `number`
  The response code.
headers: `!Object.<string>`
  The response headers. All header names will be converted to lowercase strings for consistent lookups.
body: `string`
  The response body.

Show:PublicProtectedPrivate

## Instance Methods

code » toString ( ) ⇒ `string`

## Instance Properties

code » body : `string`

The response body.

code » headers : `!Object.<string>`

The response body.

code » status : `number`

The HTTP response code.

## Static Functions

code » webdriver.http.Response.fromXmlHttpRequest ( xhr ) ⇒ `!webdriver.http.Response`

Builds a `webdriver.http.Response` from a `XMLHttpRequest` or `XDomainRequest` response object.

Parameters

xhr: `!(XDomainRequest|XMLHttpRequest)`
  The request to parse.

Returns

The parsed response.