use of com.dropbox.core.http.StandardHttpRequestor in project dropbox-sdk-java by dropbox.
the class Main method createClient.
/**
* Create a new Dropbox client using the given authentication
* information and HTTP client config.
*
* @param auth Authentication information
* @param config HTTP request configuration
*
* @return new Dropbox V2 client
*/
private static DbxClientV2 createClient(DbxAuthInfo auth, StandardHttpRequestor.Config config) {
String clientUserAgentId = "examples-longpoll";
StandardHttpRequestor requestor = new StandardHttpRequestor(config);
DbxRequestConfig requestConfig = DbxRequestConfig.newBuilder(clientUserAgentId).withHttpRequestor(requestor).build();
return new DbxClientV2(requestConfig, auth.getAccessToken(), auth.getHost());
}
Aggregations