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. Now i have 11 detail items, is there any way to paginate this request instead of copying these into two seperate request body?
{
"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"
}
]
}
}
CodePudding user response:
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.
CodePudding user response:
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