public abstract class HttpRequestor extends 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(String url,
Iterable<HttpRequestor.Header> headers) |
abstract HttpRequestor.Uploader |
startPost(String url,
Iterable<HttpRequestor.Header> headers) |
abstract HttpRequestor.Uploader |
startPut(String url,
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(String url, Iterable<HttpRequestor.Header> headers) throws IOException
IOException
public abstract HttpRequestor.Uploader startPost(String url, Iterable<HttpRequestor.Header> headers) throws IOException
IOException
public abstract HttpRequestor.Uploader startPut(String url, Iterable<HttpRequestor.Header> headers) throws IOException
IOException