Unable to send HTTP GET request
-
I'm trying to send a simple HTTP GET request with a bearer token, and I can't for the life of me get it to work. It works fine with Postman, see attached screenshot.
I've hid the URL and token as it's an internal service.Then I try to replicate this exactly using Qt 6.5 on my macOS 13.4, but my GET request just never finishes. Ie, my program is stuck in the reply->isFinished() blocking call. I know I should connect a slot to get notified async, but for testing purposes I added this blocking call. What's going on, it should be pretty straight forward. Could something in my OS be blocking network requests...?
-
@abra said in Unable to send HTTP GET request:
know I should connect a slot to get notified async, but for testing purposes I added this blocking call.
And why do you don't do that when you know it's not recommended? You are blocking the event loop so no network i/o. Use signals and slots.
Also don't post images but code properly formatted with code tags so it is readable. -
@Christian-Ehrlicher alright, stupid me, works now when I connected the finished signal to my slot...