HTTPClient.request

Sends a request to the connected host. The URL parameter is just the part after the host, so for http://somehost.com/index.php, it is index.php. Headers are HTTP request headers. For available HTTP methods, see METHOD_*. To create a POST request with query strings to push to the server, do:

More...
struct HTTPClient
@nogc nothrow
GodotError
request
(
StringArg1
StringArg3
)
(
in long method
,
in StringArg1 url
,
in PoolStringArray headers
,
in StringArg3 _body = ""
)

Detailed Description

var fields = {"username" : "user", "password" : "pass"} var queryString = httpClient.query_string_from_dict(fields) var headers = "Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length()) var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString)

Meta