Beispiel #1
0
 private void setTimeouts(OAuthRequest request) {
   if (connectTimeoutMs != null) {
     request.setConnectTimeout(connectTimeoutMs, TimeUnit.MILLISECONDS);
   }
   if (readTimeoutMs != null) {
     request.setReadTimeout(readTimeoutMs, TimeUnit.MILLISECONDS);
   }
 }
 private OAuthRequest createOauthRequest(Verb verb, String url) {
   OAuthRequest request = new OAuthRequest(verb, url);
   request.setConnectTimeout(HttpFetcher.HTTP_TIMEOUT, TimeUnit.MILLISECONDS);
   request.setReadTimeout(HttpFetcher.HTTP_TIMEOUT, TimeUnit.MILLISECONDS);
   return request;
 }