Module: selenium-webdriver/http
View Source

# class Response

Alias for `webdriver.http.Response`

Represents a HTTP response.

### new 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.

## Instance Methods

### toString()code »

Returns

`string`

## Instance Properties

body `string`

  The response body.

headers `Object<?, string>`

  The response body.

status `number`

  The HTTP response code.

## Static Functions

### Response.fromXmlHttpRequest(xhr)code »

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

Parameters

xhr`(XDomainRequest|XMLHttpRequest)`

  The request to parse.

Returns

`webdriver.http.Response`

  The parsed response.