基本使用
定义变量
多个请求用###分割
@testAPIhost = http://coc-api-admin.gishad.com/v1
@contentType = application/json
# 代理商系统
### 代理商详情
GET {{testAPIhost}}/agents/:id HTTP/1.1
content-type: {{contentType}}
### 代理商类型列表
GET {{testAPIhost}}/agent_types HTTP/1.1
content-type: {{contentType}}
### 代理商列表
GET {{testAPIhost}}/agents HTTP/1.1
content-type: {{contentType}}
POST请求
content-type与请求的内容需要间隔一行
POST http://dummy.restapiexample.com/api/v1/create HTTP/1.1
content-type: application/json
{
"name":"Hendry",
"salary":"61888",
"age":"26"
}
生成请求代码
ctrl+shift+p
选择这个Generate
可以生成各种语言的请求代码
右键也可以选择生成
参考
https://zhuanlan.zhihu.com/p/54266685
https://www.jianshu.com/p/7bbf4af2df99