我有一个带有偏移值和限值的API,valueString requestUrl = 。https:/url/offset=0&offset=1000。;this will fetch first 1000 details.I need some more details and for that I need to send the API multiple times.say for example I need execute this API 5 times and offset value should change for the first time to be 1001 and limit to be 2001How can we implement this in a generic method in java.
我不明白你的问题出在哪里,你只需要这样做。
x = 1000;
x += 1000;
url = "https://url?offsetStart=" + (x - 1000) + "&offsetEnd=" + x;
对于一个API,你可以有2个相同的参数,比如 "offset",试试 "offsetStart "和 "offsetEnd"