FAbrowser/scripts/httptest.gd
2024-07-22 11:06:25 -04:00

15 lines
385 B
GDScript

extends HTTPRequest
func _ready():
request("http://localhost/heads.php",Global.headers+
PoolStringArray(["User-Agent: Bob"]))
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_httptest_request_completed(result, response_code, headers, body:PoolByteArray):
print(JSON.parse(body.get_string_from_ascii()).result)