Godot HTTPRequest not working for my API in HTML5
I am trying to implement the HTTPRequest node in Godot to call an API I have created. I have a project that is exported to HTML5 and is supposed to send an HTTPRequest to
http://localhost:8000/2/tokens/update when the game finishes. However, the request never seems to send, despite the fact that the request() function is not returning any errors and the url it is using seems to be correct.
Here is the code in the HTTPRequest node:
And here is the code that calls it:
I know that
_on_GameTimer_timeout() works because the game pauses when the game timer goes to 0. In addition, I also know that the API I am using works properly because I can use it perfectly with Postman. The API is hosted on the same hostname (localhost:8000) and I am using Firefox on Windows.
I am completely stumped on what to do. Any help would be greatly appreciated!