springboot项目@RequestBody注解的postman或者apifox测试工具请求报文怎么写

2022-08-16 13:35:43

后端接口代码

@PostMapping(value="/xxx/xxxx")publicResponseData<Boolean>xxxx(@RequestBodyXxxBeanParam param){//code...returnResponseData.success(xxxService.xxx(param));}

@RequestBody约定的XxxBeanParam对象中包含了三个字段:aaaaa=Stringbbbbb=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}
  • 作者:市井榴芒
  • 原文链接:https://blog.csdn.net/csdn_avatar_2019/article/details/124404864
    更新时间:2022-08-16 13:35:43