Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hammock seems to suffer from redirect HTTP verb change (via requests) #21

Open
jmmills opened this issue Dec 23, 2015 · 0 comments
Open

Comments

@jmmills
Copy link

jmmills commented Dec 23, 2015

It seems that redirects will change the HTTP verb used for a request, thus breaking RESTful interaction.
For example an app that redirects http to https will transform a myapi.fragment.POST() to a myapi.fragment.GET()

This is discussed here: http://stackoverflow.com/questions/20475552/python-requests-library-redirect-new-url

Solution:

  • Disable redirects (allow_redirects=False)
  • Quietly rebuild the request if the response is an HTTP 302 with the url provided from the server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant