How to convert a Postman request to cURL Command

If you have an HTTP GET/POST or any other method request in the Postman and you want to convert it to a cURL command then you can follow the below steps.

  1. Make sure you are on the tab in which you want to get the cURL.
  2. Now locate the code icon at the top right </> and click on it.
  3. Make sure cURL is selected in the dropdown.
  4. Copy the snippet to the clipboard.
  5. And there you have the cURL for a request from Postman.
Postman request cURL Code snippet
curl --location 
--request POST 'http://localhost:8080/message?
user=101&date=2023-06-23&location=New%20York' \
--header 'Accept: application/json'

Facing issues? Have Questions? Post them here! I am happy to answer!

Author: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap