Web extension concept page: making network requests
- Dominant language
- Markdown
- Stars
- 11k
- Forks
- 23.2k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 331
Description
### MDN URL
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions
### What specific section or headline is this issue about?
_No response_
### What information was incorrect, unhelpful, or incomplete?
Performing network requests is a very common need in browser extensions, but we don't have a page dedicated to describing the concepts.
MDN has documentation on fetch (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch), so we only need to explain the relevance of extension-specific details: host permissions, the default CSP, and this mostly applies to cross-origin requests from extension contexts (and not content script contexts, which at least in MV3 do not have elevated cross-origin permissions).
Here is a dated example of Chrome's documentation (using XMLHttpRequest, which is the ancient predecessor to fetch): https://developer.chrome.com/docs/extensions/mv3/xhr/
Also, we bury some permission requirements under https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/host_permissions (and for MV2, https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions). These pages, along with the new CSP section, should be linked from a concept page that explains how to perform a network request.
### What did you expect to see?
New making network requests concepts page
### Do you have any supporting links, references, or citations?
See #23114
### Do you have anything more you want to share?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.