Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DodoIta |
Hi,
following the tutorial on the docs, I make a request to an online API to retrieve a JSON file back, so I connect the request_completed
signal with the following code:
func _on_HTTPRequest_request_completed(result, response_code, headers, body):
if result != 0:
printerr("HTTPRequest Error: ", result, " ", response_code)
return
var json = JSON.parse(body.get_string_from_utf8())
print(json.result)
And the HTTPRequest
node always returns a “RESULT_DOWNLOAD_FILE_CANT_OPEN” error (the request is accepted).
I can’t debug this kind of error, can anyone help me?