Closed faustbrian closed 6 years ago
I am currently finishing up an application and found an issue with pagination on POST endpoints, specifically a search endpoint which is obviously a POST endpoint and not GET.
I saw this line https://github.com/fknop/hapi-pagination/blob/master/lib/ext.js#L41 which seems to only allow GET routes. Is there any specific reason for only allowing GET routes to be paginated?
POST routes should be fine to be paginated as long as the route contains the required query parameters.
I am currently finishing up an application and found an issue with pagination on POST endpoints, specifically a search endpoint which is obviously a POST endpoint and not GET.
I saw this line https://github.com/fknop/hapi-pagination/blob/master/lib/ext.js#L41 which seems to only allow GET routes. Is there any specific reason for only allowing GET routes to be paginated?
POST routes should be fine to be paginated as long as the route contains the required query parameters.