Closes the current connection, allowing reuse of this HTTPClient.
Connect to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. If no port is specified (or -1 is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if use_ssl is enabled). verify_host will check the SSL identity of the host if set to true.
Returns the response's body length.
Returns the response's HTTP status code.
Returns the response headers.
Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. Structure: ("key":"value1; value2")
Returns a STATUS_* enum constant. Need to call poll in order to get status updates.
If true this HTTPClient has a response available.
If true this HTTPClient has a response that is chunked.
This needs to be called in order to have any request processed. Check results with getStatus
Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
Reads one chunk from the response.
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:
Sends a raw 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_*. Sends the body data raw, as a byte array and does not encode it in any way.
Sets the size of the buffer used and maximum bytes to read per iteration. see readResponseBodyChunk
If true, execution will block until all data is read from the response.
The connection to use for this client.
Hyper-text transfer protocol client.
Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. Note that this client only needs to connect to a host once (see connectToHost) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See request for a full example and to get started. A HTTPClient should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).