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