rest client插件下载创建 http 文件使用 .http 结尾的文件可以被 rest-client 插件识别注意:以 ### 分割接口@uri 可以定义请求前缀,且不能加 ""示例里的接口服务器地址在国外,测试时可能会发生错误,发生错误时多试几次即可 http://jsonplaceholder.typicode.com/ api.httphttp自动换行复制@uri=https://jsonplaceholder.typicode.com ### GET {{uri}}/posts/1 ### GET {{uri}}/posts ### POST {{uri}}/posts Content-Type: application/json;charset=UTF-8 { "title": "foo", "body": "bar", "userId": 1 } ### PUT {{uri}}/posts/1 Content-Type: application/json;charset=UTF-8 { "id": 1, "title": "foo", "body": "bar", "userId": 1 } ### PATCH {{uri}}/posts/1 Content-Type: application/json;charset=UTF-8 { "title": "foo", } ### DELETE {{uri}}/posts/1 ### form表单传值 POST {{uri}}/file Content-Type: application/x-www-form-urlencoded fileName=helloHono&fileSize=1024 46 行
评论区
评论加载中...