gpt4 book ai didi

firefox - 使用 "http-on-modify-request"和 "http-on-examine-response"时如何将响应映射到请求?

转载 作者:行者123 更新时间:2023-12-02 18:39:06 25 4
gpt4 key购买 nike

使用 HTTP 观察器时如何将传入响应映射到传出请求:https://developer.mozilla.org/en/Setting_HTTP_request_headers#Observers

最佳答案

比较 nsIHttpChannel 对象,例如 HttpFox是:

getPendingRequestForRequestEvent: function(request) {
// check for matching request
for (var i = 0; i < this.Requests.length; i++) {
if (request.HttpChannel === this.Requests[i].HttpChannel) {
return i;
}
}

// no match found
return -1;
},

关于firefox - 使用 "http-on-modify-request"和 "http-on-examine-response"时如何将响应映射到请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3872773/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com