Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Capture http request before sending with QtWebkit framework
Qt 6.11 is out! See what's new in the release blog

Capture http request before sending with QtWebkit framework

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    billconan
    wrote on last edited by
    #1

    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 Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved