I'm doing some tests with http requests.
i have the following code on my scene
var http_request: HTTPRequest
# Called when the node enters the scene tree for the first time.
func _ready():
http_request = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(self.on_request_completed)
func on_request_completed(result, response_code, headers, body):
var json = JSON.new()
print('created json')
json.parse(body.get_string_from_utf8())
print('parsed json')
print(str(json))
$CenterContainer/VBoxContainer/Label.text = str(json.get_data())
func _on_button_pressed():
http_request.request("https://212.227.227.158/")
print('request')
it works fine when debugging

but when i compile it and upload to the server it returns an error and i don't understand why

The http request returns the correct json