devtools-docs/docs/protocol/tot/network.html

2476 строки
32 KiB
HTML
Исходник Обычный вид История

2013-11-20 23:57:11 +04:00
{{+bindTo:partials.standard_devtools_article}}
<h1>tot: Network</h1>
2013-06-24 22:22:05 +04:00
<div>
<!-- TABLE OF CONTENTS -->
<div id="toc">
<div class="collapsible">
2013-06-24 22:22:05 +04:00
<h2>Contents</h2>
<ol>
<li>
<a href='#commands'">Commands</a>
<ol>
<li>
<a href="#command-canClearBrowserCache" href="#command-anchor">canClearBrowserCache</a>
</li>
<li>
<a href="#command-canClearBrowserCookies" href="#command-anchor">canClearBrowserCookies</a>
</li>
<li>
<a href="#command-clearBrowserCache" href="#command-anchor">clearBrowserCache</a>
</li>
<li>
<a href="#command-clearBrowserCookies" href="#command-anchor">clearBrowserCookies</a>
</li>
<li>
<a href="#command-disable" href="#command-anchor">disable</a>
</li>
<li>
<a href="#command-enable" href="#command-anchor">enable</a>
</li>
<li>
<a href="#command-getResponseBody" href="#command-anchor">getResponseBody</a>
</li>
<li>
<a href="#command-setCacheDisabled" href="#command-anchor">setCacheDisabled</a>
</li>
<li>
<a href="#command-setExtraHTTPHeaders" href="#command-anchor">setExtraHTTPHeaders</a>
</li>
<li>
<a href="#command-setUserAgentOverride" href="#command-anchor">setUserAgentOverride</a>
</li>
</ol>
</li>
<li>
<a href='#events'">Notifications</a>
<ol>
<li>
<a href="#event-dataReceived" href="#command-anchor">dataReceived</a>
</li>
<li>
<a href="#event-loadingFailed" href="#command-anchor">loadingFailed</a>
</li>
<li>
<a href="#event-loadingFinished" href="#command-anchor">loadingFinished</a>
</li>
<li>
<a href="#event-requestServedFromCache" href="#command-anchor">requestServedFromCache</a>
</li>
<li>
<a href="#event-requestWillBeSent" href="#command-anchor">requestWillBeSent</a>
</li>
<li>
<a href="#event-responseReceived" href="#command-anchor">responseReceived</a>
</li>
</ol>
</li>
</li>
<li>
<a href="#types">Types</a>
<ol>
<li>
<a href="#type-CachedResource">CachedResource</a>
</li>
<li>
<a href="#type-Headers">Headers</a>
</li>
<li>
<a href="#type-Initiator">Initiator</a>
</li>
<li>
<a href="#type-LoaderId">LoaderId</a>
</li>
<li>
<a href="#type-Request">Request</a>
</li>
<li>
<a href="#type-RequestId">RequestId</a>
</li>
<li>
<a href="#type-ResourceTiming">ResourceTiming</a>
</li>
<li>
<a href="#type-Response">Response</a>
</li>
<li>
<a href="#type-Timestamp">Timestamp</a>
</li>
</ol>
</li>
</ol>
</div><!-- /TABLE OF CONTENTS -->
<!-- API PAGE -->
<div>
<p>Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.</p>
<!-- COMMANDS -->
<div class="protocol-group">
<a name="commands"></a>
<h3>Commands</h3>
<div class="protocol-item">
<a name="command-canClearBrowserCache"></a>
<h4>Network.canClearBrowserCache</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.canClearBrowserCache"
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;,<br>
"result": {<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;"<span class="specific">result</span>": &lt;boolean&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Tells whether clearing browser cache is supported.</p>
<!-- RETURNS -->
<h4>Returns</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
result
<!-- TYPE -->
<div style="display:inline">
(
boolean
)
</div>
</var>
</strong>
<div class="description">
True if browser cache can be cleared.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="command-canClearBrowserCookies"></a>
<h4>Network.canClearBrowserCookies</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.canClearBrowserCookies"
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;,<br>
"result": {<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;"<span class="specific">result</span>": &lt;boolean&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Tells whether clearing browser cookies is supported.</p>
<!-- RETURNS -->
<h4>Returns</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
result
<!-- TYPE -->
<div style="display:inline">
(
boolean
)
</div>
</var>
</strong>
<div class="description">
True if browser cookies can be cleared.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="command-clearBrowserCache"></a>
<h4>Network.clearBrowserCache</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.clearBrowserCache"
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;
<div>}</div>
</div>
<div class="description">
<p>Clears browser cache.</p>
</div>
</div>
<div class="protocol-item">
<a name="command-clearBrowserCookies"></a>
<h4>Network.clearBrowserCookies</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.clearBrowserCookies"
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;
<div>}</div>
</div>
<div class="description">
<p>Clears browser cookies.</p>
</div>
</div>
<div class="protocol-item">
<a name="command-disable"></a>
<h4>Network.disable</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.disable"
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;
<div>}</div>
</div>
<div class="description">
<p>Disables network tracking, prevents network events from being sent to the client.</p>
</div>
</div>
<div class="protocol-item">
<a name="command-enable"></a>
<h4>Network.enable</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.enable"
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;
<div>}</div>
</div>
<div class="description">
<p>Enables network tracking, network events will now be delivered to the client.</p>
</div>
</div>
<div class="protocol-item">
<a name="command-getResponseBody"></a>
<h4>Network.getResponseBody</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.getResponseBody",<br>
"params": {<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;"<span class="specific">requestId</span>": &lt;<a href="#type-RequestId">RequestId</a>&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;,<br>
"result": {<br>
&nbsp;&nbsp;"<span class="specific">body</span>": &lt;string&gt;,<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;"<span class="specific">base64Encoded</span>": &lt;boolean&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Returns content served for the given request.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
requestId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-RequestId">RequestId</a>
)
</div>
</var>
</strong>
<div class="description">
Identifier of the network request to get content for.
</div>
</span>
</div>
</div>
<!-- RETURNS -->
<h4>Returns</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
body
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
Response body.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
base64Encoded
<!-- TYPE -->
<div style="display:inline">
(
boolean
)
</div>
</var>
</strong>
<div class="description">
True, if content was sent as base64.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="command-setCacheDisabled"></a>
<h4>Network.setCacheDisabled</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.setCacheDisabled",<br>
"params": {<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;"<span class="specific">cacheDisabled</span>": &lt;boolean&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;
<div>}</div>
</div>
<div class="description">
<p>Toggles ignoring cache for each request. If <code>true</code>, cache will not be used.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
cacheDisabled
<!-- TYPE -->
<div style="display:inline">
(
boolean
)
</div>
</var>
</strong>
<div class="description">
Cache disabled state.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="command-setExtraHTTPHeaders"></a>
<h4>Network.setExtraHTTPHeaders</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.setExtraHTTPHeaders",<br>
"params": {<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;"<span class="specific">headers</span>": &lt;<a href="#type-Headers">Headers</a>&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;
<div>}</div>
</div>
<div class="description">
<p>Specifies whether to always send extra HTTP headers with the requests from this page.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
headers
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Headers">Headers</a>
)
</div>
</var>
</strong>
<div class="description">
Map with extra HTTP headers.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="command-setUserAgentOverride"></a>
<h4>Network.setUserAgentOverride</h4>
<div class="summary">
<!-- REQUEST -->
request: {<br>
"id": &lt;number&gt;,<br>
"method": "Network.setUserAgentOverride",<br>
"params": {<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;"<span class="specific">userAgent</span>": &lt;string&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
<!-- RESPONSE -->
response: {<br>
"id": &lt;number&gt;,<br>
"error": &lt;object&gt;
<div>}</div>
</div>
<div class="description">
<p>Allows overriding user agent with the given string.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
userAgent
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
User agent to use.
</div>
</span>
</div>
</div>
</div>
</div>
<!-- for commands -->
</div>
<!-- if commands -->
<!-- EVENTS -->
<div class="protocol-group">
<a name="events"></a>
<h3>Notifications</h3>
<div class="protocol-item">
<a name="event-dataReceived"></a>
<h4>Network.dataReceived</h4>
<div class="summary">
{<br>
"method": "Network.dataReceived",<br>
"params": {<br>
&nbsp;&nbsp;<span class="specific">"requestId"</span>: &lt;<a href="#type-RequestId">RequestId</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"timestamp"</span>: &lt;<a href="#type-Timestamp">Timestamp</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"dataLength"</span>: &lt;integer&gt;,<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;<span class="specific">"encodedDataLength"</span>: &lt;integer&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Fired when data chunk was received over the network.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
requestId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-RequestId">RequestId</a>
)
</div>
</var>
</strong>
<div class="description">
Request identifier.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
timestamp
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Timestamp">Timestamp</a>
)
</div>
</var>
</strong>
<div class="description">
Timestamp.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
dataLength
<!-- TYPE -->
<div style="display:inline">
(
integer
)
</div>
</var>
</strong>
<div class="description">
Data chunk length.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
encodedDataLength
<!-- TYPE -->
<div style="display:inline">
(
integer
)
</div>
</var>
</strong>
<div class="description">
Actual bytes received (might be less than dataLength for compressed encodings).
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="event-loadingFailed"></a>
<h4>Network.loadingFailed</h4>
<div class="summary">
{<br>
"method": "Network.loadingFailed",<br>
"params": {<br>
&nbsp;&nbsp;<span class="specific">"requestId"</span>: &lt;<a href="#type-RequestId">RequestId</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"timestamp"</span>: &lt;<a href="#type-Timestamp">Timestamp</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"errorText"</span>: &lt;string&gt;,<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;<span class="specific">"canceled"</span>: &lt;boolean&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Fired when HTTP request has failed to load.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
requestId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-RequestId">RequestId</a>
)
</div>
</var>
</strong>
<div class="description">
Request identifier.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
timestamp
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Timestamp">Timestamp</a>
)
</div>
</var>
</strong>
<div class="description">
Timestamp.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
errorText
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
User friendly error message.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
canceled
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
boolean
)
</div>
</var>
</strong>
<div class="description">
True if loading was canceled.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="event-loadingFinished"></a>
<h4>Network.loadingFinished</h4>
<div class="summary">
{<br>
"method": "Network.loadingFinished",<br>
"params": {<br>
&nbsp;&nbsp;<span class="specific">"requestId"</span>: &lt;<a href="#type-RequestId">RequestId</a>&gt;,<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;<span class="specific">"timestamp"</span>: &lt;<a href="#type-Timestamp">Timestamp</a>&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Fired when HTTP request has finished loading.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
requestId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-RequestId">RequestId</a>
)
</div>
</var>
</strong>
<div class="description">
Request identifier.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
timestamp
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Timestamp">Timestamp</a>
)
</div>
</var>
</strong>
<div class="description">
Timestamp.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="event-requestServedFromCache"></a>
<h4>Network.requestServedFromCache</h4>
<div class="summary">
{<br>
"method": "Network.requestServedFromCache",<br>
"params": {<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;<span class="specific">"requestId"</span>: &lt;<a href="#type-RequestId">RequestId</a>&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Fired if request ended up loading from cache.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
requestId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-RequestId">RequestId</a>
)
</div>
</var>
</strong>
<div class="description">
Request identifier.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="event-requestWillBeSent"></a>
<h4>Network.requestWillBeSent</h4>
<div class="summary">
{<br>
"method": "Network.requestWillBeSent",<br>
"params": {<br>
&nbsp;&nbsp;<span class="specific">"requestId"</span>: &lt;<a href="#type-RequestId">RequestId</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"loaderId"</span>: &lt;<a href="#type-LoaderId">LoaderId</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"documentURL"</span>: &lt;string&gt;,<br>
&nbsp;&nbsp;<span class="specific">"request"</span>: &lt;<a href="#type-Request">Request</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"timestamp"</span>: &lt;<a href="#type-Timestamp">Timestamp</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"initiator"</span>: &lt;<a href="#type-Initiator">Initiator</a>&gt;,<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;<span class="specific">"redirectResponse"</span>: &lt;<a href="#type-Response">Response</a>&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Fired when page is about to send HTTP request.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
requestId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-RequestId">RequestId</a>
)
</div>
</var>
</strong>
<div class="description">
Request identifier.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
loaderId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-LoaderId">LoaderId</a>
)
</div>
</var>
</strong>
<div class="description">
Loader identifier.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
documentURL
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
URL of the document this request is loaded for.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
request
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Request">Request</a>
)
</div>
</var>
</strong>
<div class="description">
Request data.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
timestamp
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Timestamp">Timestamp</a>
)
</div>
</var>
</strong>
<div class="description">
Timestamp.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
initiator
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Initiator">Initiator</a>
)
</div>
</var>
</strong>
<div class="description">
Request initiator.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
redirectResponse
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
<a href="#type-Response">Response</a>
)
</div>
</var>
</strong>
<div class="description">
Redirect response data.
</div>
</span>
</div>
</div>
</div>
</div>
<div class="protocol-item">
<a name="event-responseReceived"></a>
<h4>Network.responseReceived</h4>
<div class="summary">
{<br>
"method": "Network.responseReceived",<br>
"params": {<br>
&nbsp;&nbsp;<span class="specific">"requestId"</span>: &lt;<a href="#type-RequestId">RequestId</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"loaderId"</span>: &lt;<a href="#type-LoaderId">LoaderId</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"timestamp"</span>: &lt;<a href="#type-Timestamp">Timestamp</a>&gt;,<br>
&nbsp;&nbsp;<span class="specific">"type"</span>: &lt;<a href="page.html#type-ResourceType">Page.ResourceType</a>&gt;,<br>
2013-09-30 21:20:57 +04:00
&nbsp;&nbsp;<span class="specific">"response"</span>: &lt;<a href="#type-Response">Response</a>&gt;<br>
2013-06-24 22:22:05 +04:00
2013-09-30 21:20:57 +04:00
}
2013-06-24 22:22:05 +04:00
<div>}</div>
</div>
<div class="description">
<p>Fired when HTTP response is available.</p>
<!-- PARAMETERS -->
<h4>Parameters</h4>
<div class="parameters">
<div><span class="value">
<strong>
<var>
requestId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-RequestId">RequestId</a>
)
</div>
</var>
</strong>
<div class="description">
Request identifier.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
loaderId
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-LoaderId">LoaderId</a>
)
</div>
</var>
</strong>
<div class="description">
Loader identifier.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
timestamp
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Timestamp">Timestamp</a>
)
</div>
</var>
</strong>
<div class="description">
Timestamp.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
type
<!-- TYPE -->
<div style="display:inline">
(
<a href="page.html#type-ResourceType">Page.ResourceType</a>
)
</div>
</var>
</strong>
<div class="description">
Resource type.
</div>
</span>
</div>
<div><span class="value">
<strong>
<var>
response
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Response">Response</a>
)
</div>
</var>
</strong>
<div class="description">
Response data.
</div>
</span>
</div>
</div>
</div>
</div>
<!-- for events -->
</div>
<!-- if events -->
<!-- TYPES -->
<a name="types" id="types"></a>
<h3 id="types">Types</h3>
<div class="protocol-item">
<a name="type-CachedResource"></a>
<h4>CachedResource: <var>object</var></h4>
<div class="property">
<span class="value">
<strong>
<var>
bodySize
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Cached response body size.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
response
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
<a href="#type-Response">Response</a>
)
</div>
</var>
</strong>
<div class="description">
Cached response data.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
type
<!-- TYPE -->
<div style="display:inline">
(
<a href="page.html#type-ResourceType">Page.ResourceType</a>
)
</div>
</var>
</strong>
<div class="description">
Type of this resource.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
url
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
Resource URL. This is the url of the original network request.
</div>
</span>
</div>
</div>
<div class="protocol-item">
<a name="type-Headers"></a>
<h4>Headers: <var>object</var></h4>
</div>
<div class="protocol-item">
<a name="type-Initiator"></a>
<h4>Initiator: <var>object</var></h4>
<div class="property">
<span class="value">
<strong>
<var>
lineNumber
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
number
)
</div>
</var>
</strong>
<div class="description">
Initiator line number, set for Parser type only.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
stackTrace
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
<a href="console.html#type-StackTrace">Console.StackTrace</a>
)
</div>
</var>
</strong>
<div class="description">
Initiator JavaScript stack trace, set for Script only.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
type
<!-- TYPE -->
<div style="display:inline">
(
<span>enumerated</span>
string
[
"other"
,
"parser"
,
"script"
]
)
</div>
</var>
</strong>
<div class="description">
Type of this initiator.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
url
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
string
)
</div>
</var>
</strong>
<div class="description">
Initiator URL, set for Parser type only.
</div>
</span>
</div>
</div>
<div class="protocol-item">
<a name="type-LoaderId"></a>
<h4>LoaderId: <var>string</var></h4>
</div>
<div class="protocol-item">
<a name="type-Request"></a>
<h4>Request: <var>object</var></h4>
<div class="property">
<span class="value">
<strong>
<var>
headers
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Headers">Headers</a>
)
</div>
</var>
</strong>
<div class="description">
HTTP request headers.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
method
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
HTTP request method.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
postData
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
string
)
</div>
</var>
</strong>
<div class="description">
HTTP POST request data.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
url
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
Request URL.
</div>
</span>
</div>
</div>
<div class="protocol-item">
<a name="type-RequestId"></a>
<h4>RequestId: <var>string</var></h4>
</div>
<div class="protocol-item">
<a name="type-ResourceTiming"></a>
<h4>ResourceTiming: <var>object</var></h4>
<div class="property">
<span class="value">
<strong>
<var>
connectEnd
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Connected to the remote host.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
connectStart
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Started connecting to the remote host.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
dnsEnd
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Finished DNS address resolve.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
dnsStart
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Started DNS address resolve.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
proxyEnd
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Finished resolving proxy.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
proxyStart
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Started resolving proxy.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
receiveHeadersEnd
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Finished receiving response headers.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
requestTime
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
sendEnd
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Finished sending request.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
sendStart
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Started sending request.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
sslEnd
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Finished SSL handshake.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
sslStart
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Started SSL handshake.
</div>
</span>
</div>
</div>
<div class="protocol-item">
<a name="type-Response"></a>
<h4>Response: <var>object</var></h4>
<div class="property">
<span class="value">
<strong>
<var>
connectionId
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
Physical connection id that was actually used for this request.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
connectionReused
<!-- TYPE -->
<div style="display:inline">
(
boolean
)
</div>
</var>
</strong>
<div class="description">
Specifies whether physical connection was actually reused for this request.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
fromDiskCache
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
boolean
)
</div>
</var>
</strong>
<div class="description">
Specifies that the request was served from the disk cache.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
headers
<!-- TYPE -->
<div style="display:inline">
(
<a href="#type-Headers">Headers</a>
)
</div>
</var>
</strong>
<div class="description">
HTTP response headers.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
headersText
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
string
)
</div>
</var>
</strong>
<div class="description">
HTTP response headers text.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
mimeType
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
Resource mimeType as determined by the browser.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
requestHeaders
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
<a href="#type-Headers">Headers</a>
)
</div>
</var>
</strong>
<div class="description">
Refined HTTP request headers that were actually transmitted over the network.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
requestHeadersText
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
string
)
</div>
</var>
</strong>
<div class="description">
HTTP request headers text.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
status
<!-- TYPE -->
<div style="display:inline">
(
number
)
</div>
</var>
</strong>
<div class="description">
HTTP response status code.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
statusText
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
HTTP response status text.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
timing
<!-- TYPE -->
<div style="display:inline">
(
<span class="optional">optional</span>
<a href="#type-ResourceTiming">ResourceTiming</a>
)
</div>
</var>
</strong>
<div class="description">
Timing information for the given request.
</div>
</span>
</div>
<div class="property">
<span class="value">
<strong>
<var>
url
<!-- TYPE -->
<div style="display:inline">
(
string
)
</div>
</var>
</strong>
<div class="description">
Response URL. This URL can be different from CachedResource.url in case of redirect.
</div>
</span>
</div>
</div>
<div class="protocol-item">
<a name="type-Timestamp"></a>
<h4>Timestamp: <var>number</var></h4>
</div>
<!-- for types -->
</div>
<!-- if types -->
</div><!-- API PAGE -->
</div>
</div>
2013-11-20 23:57:11 +04:00
{{/partials.standard_devtools_article}}