#woocommerce_tap I am trying to fetch header deta...
# troubleshooting
p
#woocommerce_tap I am trying to fetch header details of total number of pages to do the recursion. But it returns none
(response.headers.get("X-WP-TotalPages"))
. @hassan_syyid Using hotgluexyz version, still gives same error. Anything I am missing?
a
Hello @pranit__warehows.io_. Looking at the code, it seems that
None
will be returned when there are no more pages to fetch. The `request_records` function will automatically recurse over all the pages if pagination is detected. The API docs also mention that pagination headers are returned with a paginated response:
To determine how many pages of data are available, the API returns two header fields with every paginated response:
Could it be that the number of items you are trying to fetch fit on a single page and so the response is not paginated?
Are you working on a custom implementation or is your question related to
tap-woocommerce
?
p
Yes, Apparently the code I was using was old and got it working with new version.