selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
13 lines • 4.34 kB
HTML
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"><meta http-equiv="Content-Language" content="en"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Response</title><link href="dossier.css" rel="stylesheet" type="text/css"><header><div><form><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></header><main><article><div class="parentlink"><b>Namespace:</b> <a href="namespace_webdriver_http.html">webdriver.http</a></div><div class="codelink"><a href="source/lib/webdriver/http/http.js.src.html#l452">View Source</a></div><h1>class Response</h1><p>Represents a HTTP response.</p>
<h3>new Response(<wbr>status, headers, body)</h3><div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>status<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>The response code.</p>
<dt>headers<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a><?, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>The response headers. All header
names will be converted to lowercase strings for consistent lookups.</p>
<dt>body<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The response body.</p>
</dl></div></div><h2>Instance Methods</h2><div id="toString" class="function"><div><h3>toString()<span class="codelink"><a href="source/lib/webdriver/http/http.js.src.html#l510">code »</a></span></h3><div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></dl></div></div></div></div><h2>Instance Properties</h2><div id="body" class="property"><dl><dt><a href="source/lib/webdriver/http/http.js.src.html#l464">body</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd><p>The response body.</p>
</dl></div><div id="headers" class="property"><dl><dt><a href="source/lib/webdriver/http/http.js.src.html#l470">headers</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a><?, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code><dd><p>The response body.</p>
</dl></div><div id="status" class="property"><dl><dt><a href="source/lib/webdriver/http/http.js.src.html#l458">status</a><code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd><p>The HTTP response code.</p>
</dl></div><h2>Static Functions</h2><div id="Response.fromXmlHttpRequest" class="function"><div><h3>Response.fromXmlHttpRequest(<wbr>xhr)<span class="codelink"><a href="source/lib/webdriver/http/http.js.src.html#l483">code »</a></span></h3><p>Builds a <a href="class_webdriver_http_Response.html"><code>webdriver.http.Response</code></a> from a <code>XMLHttpRequest</code> or
<code>XDomainRequest</code> response object.</p>
<div><div class="fn-details"><div><b>Parameters</b></div><dl><dt>xhr<code>(XDomainRequest|XMLHttpRequest)</code><dd><p>The request to parse.</p>
</dl></div><div class="fn-details"><div><b>Returns</b></div><dl><dt><code><a href="class_webdriver_http_Response.html">webdriver.http.Response</a></code><dd><p>The parsed response.</p>
</dl></div></div></div></div></article><nav><h3><a href="index.html" tabindex="2">Overview</a></h3><div><input type="checkbox" id="nav-modules" checked/><label for="nav-modules"><h3><span class="selectable" tabindex="2">Modules</span></h3></label><div id="nav-modules-view"></div></div><div><input type="checkbox" id="nav-types" checked/><label for="nav-types"><h3><span class="selectable" tabindex="2">Types</span></h3></label><div id="nav-types-view"></div></div><h3><a href="Changes.html" tabindex="2">Changes</a></h3></nav></main><footer><div><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></div></footer><script src="types.js"></script><script src="dossier.js"></script>