For this example, we will use cURL to get the request exported as cURL request). #6) To export the request back to CURL, simply go to the “CODE” option in the Postman request window and select the type/language that you want to export (Postman provides a lot of different bindings/clients to which the requests can be exported to. You can try hitting Send on the imported request and match the output with that of the curl output. #5) If the Curl request syntax was correct, the Import should be successful and you should see the request turning into Postman request. #4) Now paste the curl command/request in the Import window and click Import. Open Postman Application -> Click Import -> Select “Paste Raw text” option in the Import window. #3) Now let’s try importing this request into Postman. #2) The CURL request for the above endpoint will be curl #1) To illustrate CURL, we would be using a sample REST endpoint using a fake REST service (This provides a lot of different endpoints to run a test or use it as a fake server hosting the REST endpoints). Postman provides an ability to import any CURL request as a Postman Request which can later be enhanced and makes it extremely readable. It is less readable as the output is visible on the terminal only and lacks formatting. Let’s look at each of these ways in detail!! Importing & Exporting Requests Through CurlĬURL is a command-line utility to execute any endpoint request. Through a curl request, Swagger or Open API spec, etc.
Importing Requests Through Open API SpecificationĪ new request can be directly created through the Postman console or imported through various other ways i.e.Importing & Exporting Requests Through Curl.