Intercept AJAX POST request and read data using QWebEngine?

青春壹個敷衍的年華 提交于 2019-12-11 00:44:33

问题


I'd like to intercept POST requests made by JavaScript, read the POST data, and send a reply. Formerly with QWebKit, I used QNetworkAccessManager to do this.

With Qt 5.6, I had been hoping to use QWebEngineUrlRequestInterceptor to do the same.

However, I don't see any way to read the POST data. It gives me other information about there request just fine (such as the URL). Any idea how I can get the POST data?

来源:https://stackoverflow.com/questions/35448058/intercept-ajax-post-request-and-read-data-using-qwebengine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!