After playing around using postman I found the issue.
When sending a Bearer: "" or Bearer: "xxxxxx" token, the server returns "Authentication Required".
But when sending no Bearer token or an empty Bearer: it works fine.
So when logging in; no token must be supplied else it tries to authenticate against that token instead of correctly generating a new one provided you submitted valid credentials in the JSON body.
Seems a bit odd to me, but ok.
I am really thankful to everyone who replied to me and corrected my mistakes. Your help will help me finish my work quicker.
Thanks @Christian-Ehrlicher , @Bonnie @JonB
@Elmehdi
use the QtNetworkAuthorization module.
For example: https://www.qt.io/blog/2017/01/25/connecting-qt-application-google-services-using-oauth-2-0
@elfring said in Returning C++ references from more programming interfaces?:
For example, why should Qt provide extensions that break encapsulation and increase the risk of errors?
I suggest to use algorithms which can work together with container classes at more source code places.
You did not address any of the concerns. You only added suggestions.
That is not acceptable. You must only submit ideas/proposals that don't break encapsulation.
Sorry mate but I see no point in continuing this conversation.
Some software developers agreed that they need the class “variant” for working with type-safe unions. They chose another useful programming interface. These software design decisions might influence other class libraries, don't they?
The Qt software library is using also a variant class for the support of the meta-object protocol, isn't it?
@Lodhi-bhkr Sorry, but this is not a question. What did you try? What problems do you have? Please ask more specific questions.
Looks like you asked here already: https://forum.qt.io/topic/120439/qt-code-to-send-data-on-postman-http-post-request