OLD | NEW |
1 <p id="classSummary"> | |
2 Use the <code>chrome.webRequest</code> module to intercept, block, | |
3 or modify requests in-flight and to observe and analyze traffic. | |
4 </p> | |
5 | |
6 <h2 id="manifest">Manifest</h2> | 1 <h2 id="manifest">Manifest</h2> |
7 <p>You must declare the "webRequest" permission in the <a | 2 <p>You must declare the "webRequest" permission in the <a |
8 href="manifest.html">extension manifest</a> to use the web request | 3 href="manifest.html">extension manifest</a> to use the web request |
9 API, along with <a href="declare_permissions.html">host permissions</a> | 4 API, along with <a href="declare_permissions.html">host permissions</a> |
10 for any hosts whose network requests you want to access. If you want to | 5 for any hosts whose network requests you want to access. If you want to |
11 use the web request API in a blocking fashion, you need to request | 6 use the web request API in a blocking fashion, you need to request |
12 the "webRequestBlocking" permission in addition. | 7 the "webRequestBlocking" permission in addition. |
13 For example:</p> | 8 For example:</p> |
14 <pre>{ | 9 <pre>{ |
15 "name": "My extension", | 10 "name": "My extension", |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 } | 285 } |
291 } | 286 } |
292 return {requestHeaders: details.requestHeaders}; | 287 return {requestHeaders: details.requestHeaders}; |
293 }, | 288 }, |
294 {urls: ["<all_urls>"]}, | 289 {urls: ["<all_urls>"]}, |
295 ["blocking", "requestHeaders"]); | 290 ["blocking", "requestHeaders"]); |
296 </pre> | 291 </pre> |
297 | 292 |
298 <p> For more example code, see the <a href="samples.html#webrequest">web request | 293 <p> For more example code, see the <a href="samples.html#webrequest">web request |
299 samples</a>.</p> | 294 samples</a>.</p> |
OLD | NEW |