[Interest] QWebEngine: Http POST request with payload data

Jason Dolan jason at pcc.com
Tue Mar 7 22:44:00 CET 2017


> On Mar 6, 2017, at 12:10 PM, Allan Sandfeld Jensen <kde at carewolf.com> wrote:
> 
> On Monday 06 March 2017, Jason Dolan wrote:
>> Ahh, of coarse there is a solution in the *next* release.  I feel like
>> that’s always the case with QWebEngine since Qt 5.0.  Well, I guess it
>> takes a while for it to become a full fledged replacement for QWebkit.
>> 
>> Guess I’ll go the Javascript route until we migrate to Qt 5.9.
>> 
> Another option is to use QNetworkAccessManager, especially if you don't need 
> the response body, though even if you do, you could try to inject it with 
> QWebEnginePage::setData().
> 
> Best regards
> `Allan


Interesting thought… I do need the response however.  I’m using this as a SSO into a website.  The SSO parameters are sent along in the URL and the payload is additional data for when you have successfully logged in.  I don’t think QWebEnginePage::setData() will work, because part of the SSO is creating a session connection for further navigation around the site,  “logging in” via QNetworkAccessManager, then passing the result to QWebEnginePage will not carry along cookie session info AFAIK.

Thanks,

-Jason


More information about the Interest mailing list