HTTPRequest error: Malformed URL

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DodoIta

Hi all,
I wanna use the HTTPRequest node to make an online API call.
I set up the URL in a variable (say req), called $HTTP.request(req) and got this error (Malformed URL).
I double checked the URL syntax on the API docs and it is correct, I’m particularly sure because I printed out the URL generated in Godot, pasted it on my browser and the online API responded with no errors.
I’ve been looking around the Godot docs but I haven’t found anything useful.
Any clues?

:bust_in_silhouette: Reply From: DodoIta

The error was pretty simple to fix: I just needed to add “http://” at the start of the URL string, even though it was not necessary for the API request.
Although I still have problems, I tried printing the HTTP response code and it is 200 (OK), so the request is accepted.