Preview request?

Is there a way to preview a POST request with a bunch of variables and a pre-request-script?

1 Like

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.

1 Like

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.

1 Like

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. :grinning:

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.

@gubikmic

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" \