pengwynn/faraday_middleware — pull request #20 by scottwater (2012-02-21 21:27:11+00:00)
Title: Minor updates to redirects

I had recently published a simple gem Unwind to handle redirects: https://github.com/scottwater/unwind

Then someone pointed me to FollowRedirects middleware which does 99% of the job.

This pull request adds:

- Support for 307 redirects. Not sure why this was just a todo comment previously.
- Handles edge cases where there is no location header and the link is just in the body of the response.
- Raises a specific exception where no location (or html) are available but a redirect status code is issued.
- allows me to kill my own gem. :)