The web view engine displays and runs the views provided by the server for 
sign_in and sign_up. Is there a more low-level way to do this with XHR and Qt? 
I could do everything with API requests, but then I have to make my own views 
in Qt. 

I think I’ve found a workaround which is to have the server provide the token 
in an html comment in the body of the page.

> On Jan 20, 2019, at 6:00 AM, interest-requ...@qt-project.org wrote:
> 
> Send Interest mailing list submissions to
>       interest@qt-project.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.qt-project.org/listinfo/interest
> or, via email, send a message with subject or body 'help' to
>       interest-requ...@qt-project.org
> 
> You can reach the person managing the list at
>       interest-ow...@qt-project.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Interest digest..."
> Today's Topics:
> 
>   1. Get http headers from web engine view? (First Last)
>   2. Re: Get http headers from web engine view? (Giuseppe D'Angelo)
> 
> From: First Last <jlk2...@gmail.com>
> Subject: [Interest] Get http headers from web engine view?
> Date: January 19, 2019 at 12:16:53 PM AST
> To: interest@qt-project.org
> 
> 
> I am using a qml WebEngineView to show a login/signup view (provided by a 
> Rails server). On successful login, the server provides a jwt authentication 
> token in the http headers of the response. How can I get this header from the 
> web engine? Do I need to use a webengine widget instead of qml?
> 
> 
> 
> 
> 
> From: Giuseppe D'Angelo <giuseppe.dang...@kdab.com>
> Subject: Re: [Interest] Get http headers from web engine view?
> Date: January 19, 2019 at 1:17:28 PM AST
> To: interest@qt-project.org
> 
> 
> Il 19/01/19 17:16, First Last ha scritto:
>> I am using a qml WebEngineView to show a login/signup view (provided by a 
>> Rails server). On successful login, the server provides a jwt authentication 
>> token in the http headers of the response. How can I get this header from 
>> the web engine? Do I need to use a webengine widget instead of qml?
> 
> I don't think you have any access to the HTTP stack provided by web engine. 
> Are you sure you don't need to perform the login using XHR and then using 
> getResponseHeader() to get the value of that header?
> 
> HTH,
> -- 
> Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
> KDAB (France) S.A.S., a KDAB Group company
> Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
> KDAB - The Qt, C++ and OpenGL Experts
> 
> 
> 
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to