-
Notifications
You must be signed in to change notification settings - Fork 851
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
Wrong curl generation for working POST request #10581
Closed
1 task done
Ducane opened this issue
Jan 18, 2022
· 2 comments
· Fixed by postmanlabs/postman-code-generators#666
Closed
1 task done
Wrong curl generation for working POST request #10581
Ducane opened this issue
Jan 18, 2022
· 2 comments
· Fixed by postmanlabs/postman-code-generators#666
Labels
Comments
This was referenced Feb 6, 2023
@Ducane We've fixed this issue in the latest version (10.10.x). Could you update to the latest version and check if it solves your problem? |
Closing this issue as it has been fixed in version 10.10. Feel free to reopen if the issue persists. |
This was referenced Feb 28, 2023
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Describe the Issue
Hello everyone,
If you create a POST Request with
Content-Type: application/x-www-form-urlencoded
filled with some form parameters and the response returns a 30x redirect response, then the executed postman request will work. The generated cURL command however is not working when pasted into a terminal.E.g.
is being generated. However this cURL request doesn't work in the terminal since according to this there is no need to specify
--request POST
if-d
,--data
or--data-urlencode
is used. If you still specify--request POST
all redirections triggered by--location
are sent as POST methods (instead of the usual expected GET) which leads to unexpected behaviors.The correct cURL looks like this:
Since a user expects the cURL command to behave the same way as postman is responding i suggest removing the
--request POST
in the generated cURL.Steps To Reproduce
<URL>
which returns a 30x as response.Content-type: application/x-www-form-urlencoded
or check thex-www-form-urlencoded
radio button for the body and add some key/value pairs.Screenshots or Videos
No response
Environment Information
Additional Context?
No response
The text was updated successfully, but these errors were encountered: