Posts

Showing posts with the label httpclient

How to wait particular up to particular time limit until get response from rest service

Image
Clash Royale CLAN TAG #URR8PPP How to wait particular up to particular time limit until get response from rest service In my code i am calling one external web service to get response by using HTTP Client Get request. Here the service may delay up to 5 mins to give the response. So i have to do below things. 1. want to set request timeout(No idea how to do it) 2. call the service and set the time limit up to what time it can wait for response(In my case i want to set time limit for 5 mins) can any one suggest me how can i achieve this 2 things. Thanks, Sudheer I am able to find how to set request time out i am using PoolingHttpClientConnectionManager ConnManager = new PoolingHttpClientConnectionManager(timeToLive,TimeUnit.MINUTES); . Stil no clue how to wait until get the response. – user3853393 Jul 25 at 16:12 ...