Create a client for the given URL. The argument should be fully qualified with an "http:" or "https:" scheme, or an explicit port should be provided.
Create a client with the provided Uri instance. The Uri should be fully qualified with an "http:" or "https:" scheme, or an explicit port should be provided.
Send query params only
Send raw data via the provided pump, and no query params. You have full control over headers and so on via this method.
Send content and no query params. The contentLength header will be set to match the provided content, and contentType set to the given type.
callback for sending PUT content
Get the current input headers, as returned by the host request.
Gain access to the request headers. Use this to add whatever headers are required for a request.
Gain access to the request parameters. Use this to add x=y style parameters to the request. These will be appended to the request assuming the original Uri does not contain any of its own.
Return the Uri associated with this client
Return the response-line for the latest request. This takes the form of "version status reason" as defined in the HTTP RFC.
Return the HTTP status code set by the remote server
Return whether the response was OK or not
Add a cookie to the outgoing headers
Close all resources used by a request. You must invoke this between successive open() calls.
Reset the client such that it is ready for a new request.
Set the request method
Set the request version
enable/disable the internal redirection suppport
set timeout period for read operation
Control keepalive option
Control Uri output encoding
Make a request for the resource specified via the constructor, using the specified timeout period (in milli-seconds).The return value represents the input buffer, from which all returned headers and content may be accessed.
Make a request for the resource specified via the constructor, using a callback for pumping additional data to the host. This defaults to a three-second timeout period. The return value represents the input buffer, from which all returned headers and content may be accessed.
Make a request for the resource specified via the constructor using the specified timeout period (in micro-seconds), and a user-defined callback for pumping additional data to the host. The callback would be used when uploading data during a 'put' operation (or equivalent). The return value represents the input buffer, from which all returned headers and content may be accessed.
Read the content from the returning input stream, up to a maximum length, and pass content to the given sink delegate as it arrives.
Handle redirection of Post
Handle user-notification of Post redirection. This should be overridden appropriately.
Overridable socket factory, for use with HTTPS and so on
Supports the basic needs of a client sending POST requests to a HTTP server. The following is a usage example: