OLD | NEW |
1 <h2 id="manifest">Manifest</h2> | 1 <h2 id="manifest">Manifest</h2> |
2 <p>You must declare the "webRequest" permission in the <a | 2 <p>You must declare the "webRequest" permission in the <a |
3 href="manifest">extension manifest</a> to use the web request | 3 href="manifest">extension manifest</a> to use the web request |
4 API, along with <a href="declare_permissions">host permissions</a> | 4 API, along with <a href="declare_permissions">host permissions</a> |
5 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 |
6 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 |
7 the "webRequestBlocking" permission in addition. | 7 the "webRequestBlocking" permission in addition. |
8 For example:</p> | 8 For example:</p> |
9 <pre data-filename="manifest.json"> | 9 <pre data-filename="manifest.json"> |
10 { | 10 { |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 details.requestHeaders.splice(i, 1); | 303 details.requestHeaders.splice(i, 1); |
304 break; | 304 break; |
305 } | 305 } |
306 } | 306 } |
307 return {requestHeaders: details.requestHeaders}; | 307 return {requestHeaders: details.requestHeaders}; |
308 }, | 308 }, |
309 {urls: ["<all_urls>"]}, | 309 {urls: ["<all_urls>"]}, |
310 ["blocking", "requestHeaders"]); | 310 ["blocking", "requestHeaders"]); |
311 </pre> | 311 </pre> |
312 | 312 |
313 <p> For more example code, see the <a href="samples#webrequest">web request | 313 <p> For more example code, see the <a href="samples#search:webrequest">web reque
st |
314 samples</a>.</p> | 314 samples</a>.</p> |
OLD | NEW |