Pagination strategy using RFC 5988 Link headers. More...
#include <link_header_pagination_strategy.hpp>
Public Member Functions | |
| std::string | nextPageUrl (const std::string &responseHeaders) override |
| Extract next page URL from response headers. | |
| std::string | merge (const std::vector< std::string > &pages) override |
| Merge all collected pages into a single result. | |
Public Member Functions inherited from cpp_restapi::IPaginationStrategy | |
| virtual | ~IPaginationStrategy ()=default |
Pagination strategy using RFC 5988 Link headers.
Discovers the next page via the Link: <url>; rel="next" header and merges JSON responses by concatenating arrays or deep-merging objects. Used by GitHub API and other services that paginate with Link headers.
|
overridevirtual |
Merge all collected pages into a single result.
| pages | response bodies from all pages |
Implements cpp_restapi::IPaginationStrategy.
|
overridevirtual |
Extract next page URL from response headers.
| responseHeaders | raw HTTP headers from the response |
Implements cpp_restapi::IPaginationStrategy.