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

allow for rePOST against redirect URLS #130

Open
aogier opened this issue Jun 24, 2016 · 1 comment
Open

allow for rePOST against redirect URLS #130

aogier opened this issue Jun 24, 2016 · 1 comment

Comments

@aogier
Copy link

aogier commented Jun 24, 2016

Hi, I'm trying to interact with some drupal api that returns a 301 for puts. I'm not able to tell do slumber to rePOST on second api hit is there a way ?

Thank you, ciao

PUT /api/taxonomy_term/04d99f36-266e-5c7b-9edc-6e5ea603f982/ HTTP/1.1
Host: [redacted]
User-Agent: python-requests/2.9.1

{"name": "cane"}

HTTP/1.1 301 Moved Permanently
Location: http://[redacted]/api/taxonomy_term/04d99f36-266e-5c7b-9edc-6e5ea603f982

PUT /api/taxonomy_term/04d99f36-266e-5c7b-9edc-6e5ea603f982 HTTP/1.1
Host: [redacted]
User-Agent: python-requests/2.9.1

HTTP/1.1 200 OK
@artscoop
Copy link

Do you have a simple way to strip the final "/" at the end of the URL ?
I've just had the same problem, with 405 in return (the POST method is mandatory, but not replicated on redirection)

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

2 participants