Is there a way to preview a POST request with a bunch of variables and a pre-request-script?
Hey @gubikmic
How are you defining âpreviewâ here?
See the request body before itâs sent to the server, to make sure variables are formatted and set correctly.
Generally I change the url and make it invalid. So that it doesnât reach the server and open postman consoles to see whether all values are populated correctly.
Hope this helps.
I apologize in advance if it exists and I just have not found it, but I did search this community and found this threat before starting a new one.
FWIW, I would also love to see a âPreviewâ button that reveals variable values in a request before sending it. Something like the Beautify button.
In the meantime, thank you @pranavdavar for the workaround idea!
As long as our URI is an environment variable, it should be possible to create a âdummy environmentâ to quickly make the URI invalid and revert it back. I suppose undo and redo CTRL-Z/CTRL-Y might work too.
prepend https://req.dothttp.dev/ to url and see response.
above service acts like a mirror and generates curl request.
For example:
GET https://req.dothttp.dev/https://httpbin.org/get
Some-Header: Some-Value
response will be like
curl -X GET "https://httpbin.org/get" \
-H "connection: Keep-Alive" \
-H "accept-encoding: identity" \
-H "user-agent: python-urllib3/1.26.5" \
-H "some-header: Some-Value" \
-H "client-ip: 10.0.128.19:43282" \