I think I may have found a problem in resp_link_url() at line 177:
link_headers <- headers[names(headers) == "Link"]
Here's why I think there is an issue
- I had been successfully retrieving paginated responses from the Canvas Learning Management System via their API
- Today, I noticed that I was only getting the first 100 elements of a request that had (last year) been returning 184
- The request relates to a class I teach and I have been on a break... writing an R package to access Canvas using httr2
- The Pagination page of the Canvas API documentation notes:
Because HTTP header names are case-insensitive, please be sure you are not parsing the Link header in a case-sensitive way. The capitalization of the header name is not guaranteed.
link_headers <- headers[tolower(names(headers)) == "link"]
- Seeing that resp_header_exists() does case-insensitve comparison lends weight to the idea that there is a problem.
@hadley: I think this may have happened here perhaps?