local-ch / lhc

🚀 Advanced HTTP Client for Ruby. Fueled with interceptors.
GNU General Public License v3.0
43 stars 1 forks source link

Fix status codes for error messages in README #146

Closed schmijos closed 5 years ago

schmijos commented 5 years ago

I tried LHC against 1xx responses. It works :-)

10xSebastian commented 5 years ago

How about raising 1xx ? What do you expect an http client to do on 101 ?!

schmijos commented 5 years ago

LHC.get('http://local.ch')

I was considering:

LHC.get('http://local.ch', followlocation: true)

Which would not raise (only on a timeout).

For the upgrade (HTTP 101): I'd expect the HTTP library to handle it itself without me knowing. I understand that the 101 is a second answer after complying to something like that (from https://tools.ietf.org/html/rfc7231#section-6.5.15): image

10xSebastian commented 5 years ago

The documentation describes the behavior without followlocation: true obviously... I know the standard around 101, I know how browsers (one kind of http client) handles those, but again, how would you expect a ruby http client to work? We can't do streaming, so for me, only an exception message would be an option, making your documentation changes redundant.