proxy.RequestDetails 编辑

Contains information about a web request. An instance of this object is passed into the proxy.onRequest listener.

Type

Values of this type are objects. They contain the following properties:

cookieStoreId
string. The cookie store ID of the current context.
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 is main_frame or sub_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.
incognito
boolean true for private browsing requests.
method
string. Standard HTTP method: for example, "GET" or "POST".
originUrl
string. URL of the resource that triggered the 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 the url() functional notation, then this is the URL of the original document or of the CSS document, respectively.
parentFrameId
integer. ID of the frame that contains the frame that 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 an ID to identify different events associated with the same request.
requestHeadersOptional
webRequest.HttpHeaders. The HTTP request headers that will be sent with this request. Note that this is only included if the "requestHeaders" option was passed into addListener().
tabId
integer. ID of the tab in which the request takes place. Set to -1 if the request is not related to a tab.
thirdParty
boolean. Indicates whether the request and its content window hierarchy is third party.
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", or "stylesheet".
url
string. Target of the request.

Browser compatibility

BCD tables only load in the browser

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:62 次

字数:4124

最后编辑:8 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文