Hi everyone!
I'm trying to make a couple of httprequest to my PHP server. The first is a request without parameters and i'ts working perfect.
But the another one is a request with parameters and my Server is not receiving nothing.
In my server my $_POST is null.
My code is something like this:
HttpRequest with parameters is not working
- Edited
Here's how I did a POST request that worked:
var url: String = "http://example.com/script.php"
var query: String = "param=value"
var headers: Array = [
"Content-Type: application/x-www-form-urlencoded;charset=utf8",
"Content-Length: %d" % len(query)
]
var error: int = http_request.request(url, PoolStringArray(headers), true,
HTTPClient.METHOD_POST, query)
a year later
Megalomaniak added the Godot Help tag .