Http Client
Http Client是idea的插件
简单案例:
@PostMapping("/greeting")
public String postGreeting(@RequestBody User user) {
return "Hello World " + "\n" + user;
}
创建文件rest.http
// 自定义变量
@password=xxxxxxxxxxxxxxx
POST http://localhost:8080/greeting
Authorization: Basic user 792670db-3e6d-400a-b8d4-c8e4a5a86aa8
Content-Type: application/json
{"age": "99", "id": "22659264"}
###
GET http://localhost:8080/greeting
Authorization: Basic user {{password}}
标签:http,greeting,client,user,Basic,Http,Authorization
From: https://www.cnblogs.com/moyu1011/p/17131288.html