用.http文件发请求的方法
声明一个常量用来放请求地址前缀
1 | @baseurl = http://localhost:9090 |
GET发送 JSON 格式的数据
1 | ### |
GET发送 url-encoded 格式的数据
1 | ### |
注意:urlencoded 是 URL编码(URL encoding),也称作百分号编码(Percent-encoding), 是特定上下文的统一资源定位符 (URL)的编码机制(之前以为是查询字符串)
get发送带token的请求
1 | ### |
post发送带token和参数的请求
1 | post {{http}}/my/userinfo |
PUT发送请求
1 | PUT {{baseurl}}/list/1 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 erha blog!