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 |
extractJsonFromResponse(JsonReader<T> extractor,
InputStream body) |
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 Map<String,String> |
parseAsQueryString(InputStream in) |
static byte[] |
slurp(InputStream in,
int byteLimit) |
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) |