将GET请求定时到特定的站点 [英] Timing GET requests to a specific site
问题描述
任何人都可以指向我的权利您需要监听 http-on-modify-request $ c> $ c>和
http-on-examine-response
通知。当请求即将发送并收到响应时,这些通知 。请参阅 https://developer.mozilla.org/en/Setting_HTTP_request_headers ,以获取使用 http-on-modify-request
,你会记录时间戳而不是设置一个头。另外,我想你会希望获得标签该请求属于。最后,通过比较匹配 http-on-examine-response
到前面的 http-on-modify-request
通知他们的渠道对象:如何在使用http-on-modify-request时映射对请求的响应和http-on-examine-response?
I am trying to write a firefox plug in to record the time taken to serve all GET requests to a specific website. eg google and log this data to file.In other words I would like to use each GET request as an event to trigure a timer.
Could anyone point me in the right direction?
You need to listen to the http-on-modify-request
and http-on-examine-response
notifications. These notify you when a request is about to be sent and when a response has been received. See https://developer.mozilla.org/en/Setting_HTTP_request_headers for an example using http-on-modify-request
, you would record the timestamp instead of setting a header. In addition, I guess that you will want to get the tab that the request belongs to. And finally, you match http-on-examine-response
to preceding http-on-modify-request
notifications by comparing their channel objects: How to map response to request when using "http-on-modify-request" and "http-on-examine-response"?
这篇关于将GET请求定时到特定的站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!