当前位置:网站首页>Postman 导入curl 、导出成curl、导出成对应语言代码
Postman 导入curl 、导出成curl、导出成对应语言代码
2022-07-26 04:20:00 【BUG指挥官】
1、postman导入curl
点击左上角的「import」按钮,在弹窗中选中「Raw text」,输入想被导入的curl 后,点击 「continue」按钮

随后点击弹窗右下角出现的「import」按钮,curl 请求就会被自动解析为http请求了。


如果左上角没找到「import」按钮,可以点击导航栏的「file」,下拉列表中同样有「file」功能入口。
2、postman将http请求导出成curl
如果想将 http 请求导出成 curl 命令,可以点击「code」链接,

如果你从网上搜索「postman将http请求导出成curl」,基本上的博客都是让你找这个「code」按钮,但是postman版本或者操作系统版本的原因,反正我的mac 电脑没有上面图中的「code」链接,取而代之的是右侧有个「</>」图标,点击这个图标可以达到和上面点击「code」链接一样的效果。

在接下来的下拉列表中选中「curl」

随后就生成了curl命令,全选复制或者点击右侧的「复制」图标均可完成复制,然后就可以把这个curl分享给其他人或者在控制台运行了。

3、导入成对应语言代码
还是点击「code」链接或者右侧的「</>」图标,我这里只有「</>」图标,所以点击这个图标

在下来列表中选中你想导入的语言版本,比如我这里想导出成 python 语言用requests库编写的http代码,所以我选中了「Python - Request」

随后代码就生成完毕了,这个方式有一个应用场景就是自己写的脚本请求结果不对,但是postman的请求结果是正确的,这个时候可以导出成对应语言的代码,对比自己写的代码哪里不对,很快就能找到问题所在。

4、保存http请求
如果我们想把某个请求保存下来以后接着用,我们可以点击「Save」按钮,选择保存的文件夹后,点击「save」按钮

可以看到左侧已经多了一个刚才创建的集合,这个集合里只有「百度」这个请求

边栏推荐
- Luoda development - audio stream processing - AAC / loopbacktest as an example
- I.MX6U-ALPHA开发板(主频和时钟配置实验)
- Matlab drawing
- Use of rule engine drools
- When you try to delete all bad code in the program | daily anecdotes
- Firewall command simple operation
- Pat class a 1039 course list for student
- Maximum average value of continuous interval
- ROS2的launch有何不同?
- Recommendation Book Educational Psychology: a book for tomorrow's teachers~
猜你喜欢

Working ideas of stability and high availability guarantee

MATLAB绘图

Segger embedded studio cannot find xxx.c or xxx.h file

Soft simulation rasterization renderer

Li Kou daily question - day 42 -661. Picture smoother

dijango学习

Share | 2022 big data white paper of digital security industry (PDF attached)

Go plus security: an indispensable security ecological infrastructure for build Web3

1. Mx6u-alpha development board (main frequency and clock configuration experiment)
![Matrix and Gauss elimination [matrix multiplication, Gauss elimination, solving linear equations, solving determinants] the most detailed in the whole network, with examples and sister chapters of 130](/img/84/e5cb5199fe4602440b50dfc4afe963.gif)
Matrix and Gauss elimination [matrix multiplication, Gauss elimination, solving linear equations, solving determinants] the most detailed in the whole network, with examples and sister chapters of 130
随机推荐
Unable to find sygwin.s file during vscode debugging
Yadi started to slow down after high-end
软模拟光栅化渲染器
Matrix and Gauss elimination [matrix multiplication, Gauss elimination, solving linear equations, solving determinants] the most detailed in the whole network, with examples and sister chapters of 130
Acwing brush questions
Acwing_12. 背包问题求具体方案_dp
[binary tree] the longest interleaved path in a binary tree
图论:拓扑排序
Luoda Development -- the context of sidetone configuration
Which websites can I visit to check the latest medical literature?
I.MX6U-ALPHA开发板(主频和时钟配置实验)
How to transfer English documents to Chinese?
firewall 命令简单操作
VM virtual machine has no un bridged host network adapter, unable to restore the default configuration
(translation) timing of website flow chart and user flow chart
使用百度飞桨EasyDL完成垃圾分类
SEGGER Embedded Studio找不到xxx.c或者xxx.h文件
雅迪高端之后开始变慢
Pathmatchingresourcepatternresolver parsing configuration file resource file
How to write the abbreviation of the thesis?