public class OkHttpRequestor extends HttpRequestor
HttpRequestor implementation that uses OkHttp.
You can only use this if your project includes the OkHttp library.
To use this, pass Instance to the DbxRequestConfig constructor.
HttpRequestor.Header, HttpRequestor.Response, HttpRequestor.Uploader| Modifier and Type | Field and Description |
|---|---|
static OkHttpRequestor |
Instance
A thread-safe instance of
OkHttpRequestor that connects directly
(as opposed to using a proxy). |
DefaultTimeoutMillis| Constructor and Description |
|---|
OkHttpRequestor(com.squareup.okhttp.OkHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
HttpRequestor.Response |
doGet(String url,
Iterable<HttpRequestor.Header> headers) |
com.dropbox.core.http.OkHttpRequestor.BufferUploader |
startPost(String url,
Iterable<HttpRequestor.Header> headers) |
com.dropbox.core.http.OkHttpRequestor.BufferUploader |
startPut(String url,
Iterable<HttpRequestor.Header> headers) |
public static final OkHttpRequestor Instance
OkHttpRequestor that connects directly
(as opposed to using a proxy).public HttpRequestor.Response doGet(String url, Iterable<HttpRequestor.Header> headers) throws IOException
doGet in class HttpRequestorIOExceptionpublic com.dropbox.core.http.OkHttpRequestor.BufferUploader startPost(String url, Iterable<HttpRequestor.Header> headers) throws IOException
startPost in class HttpRequestorIOExceptionpublic com.dropbox.core.http.OkHttpRequestor.BufferUploader startPut(String url, Iterable<HttpRequestor.Header> headers) throws IOException
startPut in class HttpRequestorIOExceptionCopyright © 2015. All rights reserved.