public abstract class HttpRequestor
extends java.lang.Object
HttpURLConnection
implementation, then just use StandardHttpRequestor.INSTANCE
.Modifier and Type | Class and Description |
---|---|
static class |
HttpRequestor.Header
A simple structure holding an HTTP header, which is key/value pair.
|
static class |
HttpRequestor.Response |
static class |
HttpRequestor.Uploader |
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_CONNECT_TIMEOUT_MILLIS
Default timeout, in milliseconds, for opening a connection to a network resource.
|
static long |
DEFAULT_READ_TIMEOUT_MILLIS
Default timeout, in milliseconds, for receiving a response from a network resource.
|
Constructor and Description |
---|
HttpRequestor() |
Modifier and Type | Method and Description |
---|---|
abstract HttpRequestor.Response |
doGet(java.lang.String url,
java.lang.Iterable<HttpRequestor.Header> headers) |
abstract HttpRequestor.Uploader |
startPost(java.lang.String url,
java.lang.Iterable<HttpRequestor.Header> headers) |
HttpRequestor.Uploader |
startPostInStreamingMode(java.lang.String url,
java.lang.Iterable<HttpRequestor.Header> headers) |
abstract HttpRequestor.Uploader |
startPut(java.lang.String url,
java.lang.Iterable<HttpRequestor.Header> headers) |
public static final long DEFAULT_CONNECT_TIMEOUT_MILLIS
public static final long DEFAULT_READ_TIMEOUT_MILLIS
public abstract HttpRequestor.Response doGet(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers) throws java.io.IOException
java.io.IOException
public abstract HttpRequestor.Uploader startPost(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers) throws java.io.IOException
java.io.IOException
public HttpRequestor.Uploader startPostInStreamingMode(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers) throws java.io.IOException
java.io.IOException
public abstract HttpRequestor.Uploader startPut(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers) throws java.io.IOException
java.io.IOException