Accessing WebBrowserComponents sources

Hi everybody,

I try to implement a login screen and that should create a SSO token. For that to work I need access to the returned data from the server.
I understand I can get the URL it accessed as well as the URL where it landed with the three callbacks pageAboutToLoad (const String &newURL), pageFinishedLoading (const String &url) and pageLoadHadNetworkError (const String &errorInfo).

Is there any way to intercept the returned page for reading? Something like String getCurrentPageSource() that you could query from pageFinishedLoading()?

If not, could something alike be added please?
Or is there another way to achieve this?

Cheers!

This topic has been discussed a couple of times on the forum:

Would these approaches work for your use-case?

Thank you @reuk,
Yes, I saw those posts. The second is a bit a different use case.
I try currently to follow Fabian’s suggestion and use the url from pageAboutToLoad and fetch it myself using URL::readEntireTextStream(). Unfortunately I don’t have access to the post data at that point. I don’t know yet if I need it though.
I will try then to let the browser load it again, since I cannot set that downloaded data into the webBrowser. I am not sure if the wordpress of my client likes that, it’s worth a shot.

I will report back when I tried those. I try to avoid too many requirements on the server side, since I don’t know the skillset of my client who does the wordpress site themselves.