[英]Paginate a request body in springboot
I have a request body in json which needs to be passed for calling another api, in this request body at max only 10 details items could be passed.我在 json 中有一个请求正文,需要传递它才能调用另一个 api,在此请求正文中最多只能传递 10 个详细信息项。 Now i have 11 detail items, is there any way to paginate this request instead of copying these into two seperate request body?
现在我有 11 个详细信息项,有什么方法可以对这个请求进行分页而不是将它们复制到两个单独的请求正文中吗?
{
"name": "abcd",
"subject": {
"Details": [
{
"point": "1"
},
{
"point": "2"
},
{
"point": "3"
},
{
"point": "4"
},
{
"point": "5"
},
{
"point": "6"
},
{
"point": "7"
},
{
"point": "8"
},
{
"point": "9"
},
{
"point": "10"
},
{
"point": "11"
}
]
}
}
You must follow the rules and standards of the api that will make the request, that is, if the api accepts up to 10 records in details, you must follow this rule, otherwise, it will probably return an error/handling message.你必须遵循api发出请求的规则和标准,即如果api详细接受最多10条记录,你必须遵循这个规则,否则,它可能会返回一个错误/处理信息。
There is no such thing as paginating a request.没有分页请求这样的事情。 The endpoint can only accept 10 items at a time, so you'd need to send a second request
端点一次只能接受 10 个项目,因此您需要发送第二个请求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.