Example: Next page token paging that uses an HTTP header returned in a response header
- Last Updated: January 23, 2024
- 1 minute read
- DataDirect Connectors
- ODBC
- Autonomous Rest Connector 8.0
- Documentation
Example: Next page token paging that uses an HTTP header returned in a response header
In this section, we are going to demonstrate how to configure the driver for paging
mechanisms that use an HTTP header returned in a response header to return the next page of
a result set. The following is an example of a header that is returned in a response. The
header, next, specifies the value argument of an HTTP header that is issued
in a subsequent request to return the next page in the result set.
next=page_2
If the HTTP header used to return additional pages is next_page, the
driver would issue a request with the following HTTP header to retrieve the next page.
next_page=page_2
To configure paging for this mechanism, you need to specify values for the
nextPageResponseHeader and nextPageRequestHeader
parameters. The nextPageResponseHeader parameter specifies the name of the
header in the response that contains the value of the HTTP header to be used in the
subsequent request. In this case, the value is next. Conversely, the
nextPageRequestHeader parameter specifies the name of the HTTP header
that issued in the request to return the next page. In this example, the value should be
next_page. The following is example of configuring paging using an HTTP
header passed in a response header.
"#pageSizeParameter": "limit",
"#maximumPageSize": 100,
"#nextPageResponseHeader": "next",
"#nextPageRequestHeader": "next_page"