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
Redirect with followOriginalHttpMethod:true does not mantain the original body #2608
Comments
Any update on this? |
I have the same issue... running PHP cURL exported straight from Postman and it returns "You are being redirected." rather than the actual response from Dashboard. |
Is there any update on this? |
Having same issue with Meraki Dashboard API that does a bunch of 302s and then a 308 redirect after which the POST body is gone. Changing the URL from their published one to the one that the redirects are using, fixes the issue. |
@nmarus yes, you right. I have already tried this but anyway this remains a valid but in the module |
Any news? |
This PR fixes this? Any reason the merge hasn't happened yet? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Summary
Hi there, I'm currently working with
Cisco Meraki
web APIs and they return a redirect for each request. During my test I noticed that the request's body is not propagated in the redirected requests.Simplest Example to Reproduce
I created a simple express server to test it easily (it's online so you can use it for testing)
and this is a simple request snippet to prove that behavior:
This is the output running the snippet with request in debugging mode:
Expected Behavior
The expected behavior is that the original body is propagated about the redirects
Current Behavior
In the current behavior the redirected requests do not contain the original body
Possible Solution
Probably if the
followOriginalHttpMethod
is true and the method is different fromGET
orHEAD
the request module should insert the original body in the redirected request.Context
I'm currently working with
Cisco Meraki
web APIs and they return a redirect for each request. Since the request module an important part of my system I need to fix this behavior soon.Environment
Mirko
The text was updated successfully, but these errors were encountered: