beders/Resty — pull request #9 by gabrielf (2012-01-26 14:38:29+00:00)
Title: Add ability to set read timeout

Hi, I just noticed that the timeout, that you can currently set when using Resty, is the connect timeout i.e. the time it takes to establish the TCP/IP connection from my understanding. I need the ability to set the read timeout so if a server is able to establish the TCP/IP connection but fails to deliver it's content within a defined timeout then I can fail gracefully (instead of hanging forever).

I created a "unit test" to test the added read timeout but I don't know how to create such a test for the connect timeout since it's on a lower level. The reason I put unit test in quotation marks is that the test takes at least a second to run. Preferably they should be instant...