mamantoha / crest

HTTP and REST client for Crystal
https://mamantoha.github.io/crest/
MIT License
235 stars 14 forks source link

handle_errors is ignored for redirect errors #132

Closed captn3m0 closed 4 years ago

captn3m0 commented 4 years ago
Crest.get(url, max_redirects: 0, handle_errors: false) do |response|
end

against a response of 302 will always raise a "Found" exception. The usecase is to have a streaming response, but with an ability to detect it in case the site returns a 302 with an invalid response.

mamantoha commented 4 years ago

Thanks @captn3m0