West Wind Internet and Client Tools
Parse Link from Response Header
Gravatar is a globally recognized avatar based on your email address. Parse Link from Response Header
  Bob Powell
  All
  Jan 15, 2020 @ 07:04am

The REST API for Shopify has a limit to the number of records returned when getting the list of products. They use "paginated REST" and the response header has a Link with the next page of records. I am using the JSAON serializer to process the products returned into a VFP cursor. But I don't know how to find the header information being returned in order to get the next "page" of products. The format they use for this in the header is: #... Link: "https://{shop}.myshopify.com/admin/api/{version}/products.json?page_info={page_info}&limit={limit}; rel={next}, https://{shop}.myshopify.com/admin/api/{version}/products.json?page_info={page_info}&limit={limit}; rel={previous}" #... To get the next page the next get would be like:

GET /admin/api/2020-01/products.json?page_info={page_info}

But I don't understand enough to know how to get the header information ?

Thanks, Bob

Gravatar is a globally recognized avatar based on your email address. re: Parse Link from Response Header
  Rick Strahl
  Bob Powell
  Jan 15, 2020 @ 12:19pm

Look into GetHttpHeader() or if you want the full header block you can look at cHttpHeaders after a successful call to the server.

+++ Rick ---

© 1996-2020