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

POST is sent but GET is captured #13

Open
natsu90 opened this issue Nov 15, 2015 · 2 comments
Open

POST is sent but GET is captured #13

natsu90 opened this issue Nov 15, 2015 · 2 comments

Comments

@natsu90
Copy link

natsu90 commented Nov 15, 2015

I sent POST http://api.webhookinbox.com/i/{id}/in (notice the missing last trailing slash), but view would show as GET request instead.

@jkarneges
Copy link
Member

Ah, probably because Django returns a code 301 redirect, which means the client is supposed to use GET when following the redirect. We should consider using code 308 which preserves the request method across redirects.

@jkarneges
Copy link
Member

Looks like the way to do this is to subclass CommonMiddleware and override the response_redirect_class attribute.

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