You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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
Create a POST at a resource <URL> which returns a 30x as response.
Add the Request-Header Content-type: application/x-www-form-urlencoded or check the x-www-form-urlencoded radio button for the body and add some key/value pairs.
Copy the generated curl and try to execute it in the terminal. It will try to call the redirects with POST as a method, which can lead to unexpected behavior.
Screenshots or Videos
No response
Environment Information
- Operating System: Mac OS
- Platform Type:
- Postman Version: v.9.0.9
Additional Context?
No response
The text was updated successfully, but these errors were encountered:
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: