Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert cURL to postman?

Tags:

curl

postman

Postman has built-in function to convert postman to cURL code, but if I want to convert cURL code to postman, How can I do this efficiently? For example, cURL code as following;

curl -v -X POST "https://speech.platform.bing.com/recognize?scenarios=smd&appid=D4D52672-91D7-4C74-8AD8-42B1D98141A5&locale=your_locale&device.os=your_device_os&version=3.0&format=json&instanceid=your_instance_id&requestid=your_request_id" -H 'Authorization: Bearer your_access_token' -H 'Content-type: audio/wav; codec="audio/pcm"; samplerate=16000' --data-binary @your_wave_file 
like image 463
James Chang Avatar asked Mar 28 '17 10:03

James Chang


People also ask

Can we run cURL command in Postman?

You can construct a request in Postman and convert it to cURL using the code snippet generator. Running cURL commands in a more user-friendly way. You can import a cURL request into Postman and run it.

Is Postman same as cURL?

Postman is a platform for testing APIs. cURL is a command-line utility that allows you to transmit data over URLs. To do the same operations with REST APIs, we may use Postman as a GUI (graphical user interface) and cURL as a CLI (command-line interface).

How can I see the cURL command in Postman?

Generate Curl from Postman Click on the Code button. A dialog “GENERATE CODE SNIPPET” will appear. Select “cURL” from the dropdown. You can copy the command using Copy to Clipboard button.


1 Answers

By using the 'Import' functionality followed by 'Paste Raw Text'.

Explained in the official docs here.

For the body it selects raw and expects the user to paste the content of the file into Postman. Alternatively you can toggle it to binary and upload the file manually while doing the actual request.

like image 167
Pratik Mandrekar Avatar answered Oct 28 '22 00:10

Pratik Mandrekar