Kong / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
http://kong.github.io/unirest-java/
MIT License
2.6k stars 594 forks source link

Unirest does not seem to be exposing connection request timeout(org.apache.http.client.config.connectionRequestTimeout of RequestConfig) #235

Closed satheeshakkinepally closed 5 years ago

satheeshakkinepally commented 6 years ago

It appears Unirest does not expose the connectionRequestTimeout when asking for connection from a pool and defaults to socket timeout . This is confusing as the potential timeout issues that are caused because of connectionRequestTimeout are solved by increasing the socketTimeout.

Further, if there are a many requests in the queue, they start timing out even if the client wants to throttle the messages and process them at a controlled rate by increasing connectionRequestTimeout while keeping the connectionTimeOut and socketTimeout the default

ryber commented 5 years ago

Fixed in upcoming v2

ryber commented 5 years ago

Hello, this should be resolved or addressed in Unirest 2. Please see the upgrade guide for important changes.