On Oct 17, 10:01 am, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > * how to create a nsIHttpChannel which inspects the http response in
> > c?
>
> Which http response?  If you just want to make a new request and examine the
> response, you can use nsIIOService to create channels.  Then you asyncOpen the
> channel with a listener that you create, and wait for OnStartRequest.  There 
> you
> can examine the response.
>
> If you want to examine the responses the browser gets in general, you want to
> use the http-on-examine-response notification.  
> Seehttp://developer.mozilla.org/en/docs/Observer_Notifications#HTTP_requ...
>


Boris,

Thank you for your help. Yes. I am typing to examine http response in
general.  So I need to use http-on-examine-response notification per
your suggestion.
However, when I search the mozilla source code for 'http-on-examine-
response' and 'NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC', I only get these
results:

$ grep -r http-on-examine-response .
./netwerk/protocol/http/src/nsHttpChannel.cpp:    // notify "http-on-
examine-response" observers
./netwerk/protocol/http/public/nsIHttpProtocolHandler.idl:#define
NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC "http-on-examine-response"

$ grep -r NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC .
./netwerk/protocol/http/src/nsHttpHandler.h:
NotifyObservers(chan, NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC);
./netwerk/protocol/http/public/nsIHttpProtocolHandler.idl:#define
NS_HTTP_ON_EXAMINE_RESPONSE_TOPIC "http-on-examine-response"

Can you please tell me where i can find an example (in c/c++) in
observing http-on-examine-response ?

Thank you for any more pointers.


Thank you.






> -Boris


_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to