如何将 cURL 转换为邮递员?邮递员、转换为、如何将、cURL

2023-09-07 10:30:11 作者:冷暖自知

Postman 内置了将 postman 转换为 cURL 代码的功能,但是如果我想将 cURL 代码转换为 postman,我怎样才能有效地做到这一点?例如cURL代码如下;

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

推荐答案

通过使用导入"功能,然后使用粘贴原始文本".

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

在官方文档这里中有解释.

对于 body,它选择 raw 并希望用户将文件内容粘贴到 Postman.或者,您可以将其切换为 binary 并在执行实际请求时手动上传文件.

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.