I am calling my java webservice (POST request) via POSTMAN in the following manner which works perfectly fine (i.e. I can see my records getting inserted into the database):
https://i.stack.imgur.com/M1D5Y.png
And, here's how the contents inside the Headers(1)
tab looks like:
https://i.stack.imgur.com/uwVrt.png
Instead of calling it via POSTMAN, I have to call the same request in PHP using CURL. I am wondering if there's a way to export this command to curl
command so that I could use it in my PHP code? I have found opposite approach at many places online where someone is asking to convert Curl based request to POSTMAN but couldn't figure out how to do the opposite.
Some articles I found for curl to postman
https://i.stack.imgur.com/ziTKS.png
You can see the button "Code" in the attached screenshot, press it and you can get your code in many different languages including PHP cURL
https://i.stack.imgur.com/JKzG4.png
Edited: As other answers said Postman UI was updated, I change the images accordingly
Starting from Postman 8
you need to visit here
https://i.stack.imgur.com/wX6ht.png
https://i.stack.imgur.com/6Mld1.jpg
If you're like me running MacOS and still have Postman v7, you have to click the ellipses here to find the code option
https://i.stack.imgur.com/92rBv.png
Here is a quick video demonstration postman request to curl
Latest version 8.x:
Find Code symbol on the right side of the postman.
Select cURL from the dropdown.
https://i.stack.imgur.com/HXFxx.png
See screenshot:
Success story sharing