将多个curl请求导入Postman

我正在尝试将curl请求的列表导入Postman集合中。

只有一个URL,导入没有问题:

  • 我转到import→paste raw text
  • 粘贴类似curl -X GET 'https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=gesundbrunnen&inputtype=textquery&fields=formatted_address'
  • 的网址
  • 它像吊饰一样被导入。

但是如果我尝试使用两个URL进行同一个游戏,则会出现错误

Error while importing Curl: Only the URL can be provided without an option preceding it. All other inputs must be specified via options.

什么意思是错误,如何将多个curl命令导入Postman?

ps :主题旁边的一个问题:除了Postman之外,也许还有其他方法可以导入多个请求(GET / POST)并自动一次运行它们?

pacheco 回答:将多个curl请求导入Postman

试试这个方法:

  • 将所有的 cUrls 放入一个文件中,每个都在一行中
  • 使用“split”或其他工具将文件拆分为多个文件,文件中的每一行(对于拆分:split yourfile -l 1)
  • 通过邮递员的导入按钮导入它们
,

This guy说,您可以使用curl-to-postman编写脚本。我没有尝试过,但希望能帮上忙。

本文链接:https://www.f2er.com/3143977.html

大家都在问