VMx

vmx.im
啥都学一点的填坑人
  1. 首页
  2. 填坑
  3. 正文

post 测试请 postman 让让

2021年8月10日 775点热度 0人点赞 0条评论

相信大部分在 http 开发的时候都会用到 postman,有时候一个简单的 get /post 测试需要装一个这么庞大的东东,而且还让你注册,真是有些烦。。。现推荐些 vscode的小插件完全可以胜任,不过vscode的插件使用 form-data 会有些问题:
1、postcode: 这个最方便,界面与postman类似,直接在界面上就显示图标,不过使用 form-data 发送 key/value会出错,因为他不生成 boundary。可以使用x-www-form-urlencoded来代替。
2、http client:直接就没有form-data项,其它功能与 postcode 类似。调用需要命令行:http client:open http client
3、curl:命令行工具,我是参考 postman 生成的命令,简单的测试就不用那个 postman 了。
curl --request POST --url http://127.0.0.1:8080/form_post --header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' --form nick=hello

Post Views: 343
标签: 暂无
最后更新:2021年8月10日

huifei

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2021 vmx.im. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang