The third parameter to getRequestToken is sent to the server, not
passed to the HTTP client library.  This should work better:

OAuthClient client = ...
client.getHttpParameters().put(HttpClient.CONNECT_TIMEOUT, 3*1000);
client.getHttpParameters().put(HttpClient.READ_TIMEOUT, 6*1000);
client.getRequestToken(accessor, null, null);

On Jul 24, 5:15 am, Mariusz <[email protected]> wrote:
> Could someone tell me how I can set timeout for
> OAuthClient.getRequestToken() in Java? I have already tried this:
>
> OAuthClient httpClient = new OAuthClient(new HttpClient4());
>
> HashMap<String,Integer> params = new HashMap<String,Integer>();
> params.put(HttpClient.CONNECT_TIMEOUT, 3*1000);
> params.put(HttpClient.READ_TIMEOUT, 6*1000);
> Set<Map.Entry<String, Integer>> setParams = params.entrySet();
>
> httpClient.getRequestToken(accessor, null, setParams);
>
> Unfortunately timeout is very long (longer than 6000 msecs) still. Can
> I set my timeout?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/oauth?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to