I'm newie in Godot and I'm stuck with this.
I have a scene that loads an image from a web server via HttpRequest. The image is loaded into a new texture and assigned to a TextureButton.
Here is the code:
$HTTPRequest.connect("request_completed", self, "_http_request_image_completed")
func _http_request_image_completed (result, response_code, headers, body):
var image = Image.new()
var image_error = image.load_png_from_buffer(body)
if image_error != OK:
print ("Can't show the image")
var texture = ImageTexture.new()
Everything works fine when it runs on the debugger or even when is exported to android, but when I try to export the project to HTML5 I've got a resultcode 4 that means "RESULTCONNECTION_ERROR = 4. Request failed due to connection (read/write) error."
I have tried accessing images that are served in both https and http with the same result when the project is exported to HTML5.
I would appreciate any help.
Many thanks in advance.