Closed schmijos closed 5 years ago
How about raising 1xx ? What do you expect an http client to do on 101 ?!
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):
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.
I tried LHC against 1xx responses. It works :-)