Function 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:

godot.core.defs.GodotError request (
  const(long) method,
  const(String) url,
  const(PoolArray!(godot.core.string.String)) headers,
  const(String) _body = GodotStringLiteral().str()
) nothrow @nogc;

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