Package com.dropbox.core.http
Class HttpRequestor
- java.lang.Object
-
- com.dropbox.core.http.HttpRequestor
-
- Direct Known Subclasses:
GoogleAppEngineRequestor,OkHttp3Requestor,OkHttpRequestor,StandardHttpRequestor
public abstract class HttpRequestor extends java.lang.ObjectAn interface that the Dropbox client library uses to make HTTP requests. If you're fine with the standard JavaHttpURLConnectionimplementation, then just useStandardHttpRequestor.INSTANCE.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHttpRequestor.HeaderA simple structure holding an HTTP header, which is key/value pair.static classHttpRequestor.Responsestatic classHttpRequestor.Uploader
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_CONNECT_TIMEOUT_MILLISDefault timeout, in milliseconds, for opening a connection to a network resource.static longDEFAULT_READ_TIMEOUT_MILLISDefault timeout, in milliseconds, for receiving a response from a network resource.
-
Constructor Summary
Constructors Constructor Description HttpRequestor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract HttpRequestor.ResponsedoGet(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers)abstract HttpRequestor.UploaderstartPost(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers)HttpRequestor.UploaderstartPostInStreamingMode(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers)abstract HttpRequestor.UploaderstartPut(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers)
-
-
-
Field Detail
-
DEFAULT_CONNECT_TIMEOUT_MILLIS
public static final long DEFAULT_CONNECT_TIMEOUT_MILLIS
Default timeout, in milliseconds, for opening a connection to a network resource. A value of 0 indicates the timeout should be disabled.
-
DEFAULT_READ_TIMEOUT_MILLIS
public static final long DEFAULT_READ_TIMEOUT_MILLIS
Default timeout, in milliseconds, for receiving a response from a network resource. A value of 0 indicates the timeout should be disabled.
-
-
Method Detail
-
doGet
public abstract HttpRequestor.Response doGet(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers) throws java.io.IOException
- Throws:
java.io.IOException
-
startPost
public abstract HttpRequestor.Uploader startPost(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers) throws java.io.IOException
- Throws:
java.io.IOException
-
startPostInStreamingMode
public HttpRequestor.Uploader startPostInStreamingMode(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers) throws java.io.IOException
- Throws:
java.io.IOException
-
startPut
public abstract HttpRequestor.Uploader startPut(java.lang.String url, java.lang.Iterable<HttpRequestor.Header> headers) throws java.io.IOException
- Throws:
java.io.IOException
-
-