后端接口代码
@PostMapping(value = "/xxx/xxxx")
public ResponseData<Boolean> xxxx(@RequestBody XxxBeanParam param) {
//code...
return ResponseData.success(xxxService.xxx(param));
}
在@RequestBody约定的XxxBeanParam对象中包含了三个字段:aaaaa=String,bbbbb=List<String>,ccccc=Integer
接口URL
使用post请求,请求接口API:http://localhost:3000/api/v1/test/xxx/xxxx
测试工具内的请求报文
使用postman或者apiofox测试的话,需要选择post请求方式,请求数据块内选择raw,最后将请求报文json拷贝进入即可。

请求报文示例:
{
"aaaaaaa": "e76ac15759da42f6bab8dad2fb195d76",
"bbbbbbb": [
"ffb2fbd7e60345a4b9d81677fa2d0f9c"
],
"ccccccc":9527
}
本文介绍了如何通过POST请求调用后端接口 `/api/v1/test/xxx/xxxx`,以XxxBeanParam对象传递参数,包括String、List和Integer类型。展示了如何在Postman中构造请求报文,以及关键代码片段。
7988

被折叠的 条评论
为什么被折叠?



