69

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
Dharman
  • 30,962
  • 25
  • 85
  • 135
James Chang
  • 821
  • 1
  • 6
  • 5
  • 1
    Possible duplicate of [Simulate a specific CURL in PostMan](https://stackoverflow.com/questions/27957943/simulate-a-specific-curl-in-postman) – T.Todua Jan 11 '18 at 16:17
  • here is quick 1 minute video https://youtu.be/CvutW041-2k – VedantK Aug 22 '21 at 13:25

1 Answers1

107

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.

Pratik Mandrekar
  • 9,362
  • 4
  • 45
  • 65
  • 16
    If your curl includes -u you'll need to manually paste the username:password into the Authorization tab with type Basic Auth – Toby Beresford May 09 '17 at 08:27
  • 5
    -u can also be passed as https://username:password@mydomain.com if you like to keep all things in the URL and not use the header. – Pratik Mandrekar Jul 13 '17 at 13:31
  • 1
    The problem here is postman only accepts very specific formated cURL request that is generated by the postman. Any cURL we cannot give to postman to consume. – Ameya Feb 09 '22 at 09:35