Contains information about a web request that the browser is about to make. An instance of this object is passed into the proxy.onRequest
listener.
Type
Values of this type are objects. They contain the following properties:
documentUrl
string
. URL of the page into which the requested resource will be loaded.frameId
integer
. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (type
ismain_frame
orsub_frame
),frameId
indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab.fromCache
boolean
. Indicates if this response will be fetched from disk cache.ip
- The server IP address that the request will be sent to. Note that it may be a literal IPv6 address.
method
string
. Standard HTTP method: for example, "GET" or "POST".originUrl
string
. URL of the resource that triggered this request. Note that this may not be the same as the URL of the page into which the requested resource will be loaded. For example, if a document triggers a load in a different window through the target attribute of a link, or a CSS document includes an image using theurl()
functional notation, then this will be the URL of the original document or of the CSS document, respectively.parentFrameId
integer
. ID of the frame that contains the frame which sent the request. Set to -1 if no parent frame exists.requestId
string
. The ID of the request. Request IDs are unique within a browser session, so you can use them to relate different events associated with the same request.requestHeaders
OptionalwebRequest.HttpHeaders
. The HTTP request headers that are going to be sent out with this request. Note that this is only included if the"requestHeaders"
option was passed intoaddListener()
.tabId
integer
. ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab.timeStamp
number
. The time when this event fired, in milliseconds since the epoch.type
webRequest.ResourceType
. The type of resource being requested: for example, "image", "script", "stylesheet".url
string
. Target of the request.
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | ||||
---|---|---|---|---|---|
Basic support | Chrome No support No | Edge No support No | Firefox Full support 60 | Opera No support No | Firefox Android Full support 60 |
Legend
- Full support
- Full support
- No support
- No support