Methods
Modifier and Type |
Method and Description |
static ArrayList<HttpRequestor.Header> |
addUserAgentHeader(ArrayList<HttpRequestor.Header> headers,
DbxRequestConfig requestConfig) |
static String |
buildUri(String host,
String path) |
static String |
buildUrlWithParams(String userLocale,
String host,
String path,
String[] params) |
static HttpRequestor.Header |
buildUserAgentHeader(DbxRequestConfig requestConfig) |
static <T> T |
doGet(DbxRequestConfig requestConfig,
String accessToken,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
static <T> T |
doPost(DbxRequestConfig requestConfig,
String accessToken,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
static <T> T |
doPostNoAuth(DbxRequestConfig requestConfig,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers,
DbxRequestUtil.ResponseHandler<T> handler) |
static String |
encodeUrlParam(String s) |
static <T> T |
finishResponse(HttpRequestor.Response response,
DbxRequestUtil.ResponseHandler<T> handler) |
static String |
getFirstHeader(HttpRequestor.Response response,
String name) |
static String |
getFirstHeaderMaybe(HttpRequestor.Response response,
String name) |
static byte[] |
loadErrorBody(HttpRequestor.Response response) |
static String |
parseErrorBody(int statusCode,
byte[] body) |
static <T> T |
readJsonFromResponse(JsonReader<T> reader,
InputStream body) |
static <T,E extends Throwable> T |
runAndRetry(int maxTries,
DbxRequestUtil.RequestMaker<T,E> requestMaker) |
static HttpRequestor.Response |
startGet(DbxRequestConfig requestConfig,
String accessToken,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers)
Convenience function for making HTTP GET requests.
|
static HttpRequestor.Response |
startPostNoAuth(DbxRequestConfig requestConfig,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers)
Convenience function for making HTTP POST requests.
|
static HttpRequestor.Uploader |
startPut(DbxRequestConfig requestConfig,
String accessToken,
String host,
String path,
String[] params,
ArrayList<HttpRequestor.Header> headers)
Convenience function for making HTTP PUT requests.
|
static DbxException |
unexpectedStatus(HttpRequestor.Response response) |