Closed clintjhill closed 1 year ago
This is good! Maybe we should also just follow redirects, or have an option to do that?
I'm all for a "follow" option. Seems reasonable. 🤝
Personally, when using a HTTP client like this I don't want to actually follow requests. Most often I'm only interested in the atomic request/response to assert my flows. But I see the fit & purpose of a "follow" option if using this client for integration style testing.
It would be my opinion to ship this change, let it simmer, and see if smarter folks than me come up with a nice follow feature.
The current implementation errors when 301 or 302 statusCodes are returned. A potential fix for #20 I believe. This implementation does not "follow" redirects, rather it simply does not throw exceptions allowing the client to handle the redirect.
👀 - there was a weird broken test for
OPTIONS
, looks like a fat-finger, and even after fixing that the tests were failing due to a 405statusCode
thathttps://mozilla.org/en-US/
was returning.