cheald / manticore

Manticore is a JRuby HTTP client built on the Apache HttpClient 4.x components
https://gitlab.com/cheald/manticore
MIT License
54 stars 34 forks source link

timeout settings limited to whole seconds? #65

Closed earthtrip closed 7 years ago

earthtrip commented 7 years ago

I have a need to timeout after 200 milliseconds but it appears (it doesn't actually say this anywhere in the docs but inferring based on the code and comments) you can only set the timeout settings for request, connect and socket in whole seconds? Which is odd since HttpClient itself these settings are in milliseconds.

Thanks for any advice

cheald commented 7 years ago

Timeouts in Manticore are expressed in seconds for consistency with other Ruby HTTP libraries. You can specify a 200ms timeout by passing a timeout of 0.2. The doc incorrectly specifies that the timeouts are integers - they should be floats.

cheald commented 7 years ago

I've fixed the documentation issues in bfa687e0e97f5b5a0e1c7fb0221288489c7aa7ae.

earthtrip commented 7 years ago

OK perfect - thanks!!