class Response

Represents a HTTP response.

new Response(status, headers, body)

Parameters
statusnumber

The response code.

headersObject<?, string>

The response headers. All header names will be converted to lowercase strings for consistent lookups.

bodystring

The response body.

Instance Methods

toString()code »

Returns
string

Instance Properties

bodystring

The response body.

headersObject<?, string>

The response body.

statusnumber

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.