June 24, 2011

billconan billconan
Ant Farmer
116 posts

capture http request before sending with QtWebkit framework


Hello guys,

I am trying to write something similar to the http package viewer of the chrome developer tool. I want to use a QWebView to load some Url, and if I click any link on that web page (or submit a form), my program can print the http package I just sent (http header, cookies and form data).

I checked the document for webview, webpage, webframe and also networkmanager. But I couldn’t find a signal which is emitted just before sending the request. I am wondering if there is an easy way to do this, or must I change the QWebkit framework myself?

Thank you very much.

1 reply

June 24, 2011

loladiro loladiro
Lab Rat
594 posts

You can subclass QNetworkAccessManager and reimplement createRequest to do that (Just do your logging and then fallback to the parent function).

  ‹‹ [SOLVED] Using standard icons of OS for Qt application      QColor name to rgb name ››

You must log in to post a reply. Not a member yet? Register here!