Skip to content

Link header-based paging #361

@kevinchalet

Description

@kevinchalet

Hey,

To make our lives more painful than they are, some SendGrid APIs - like global suppressions - use Link response headers instead of their usual _metadata node to expose paging-related information. For instance, here's what the suppression/unsubscribes endpoint returns:

image

Link: <https://api.sendgrid.com/v3/suppression/unsubscribes?limit=50&offset=50>; rel="next"; title="2", <https://api.sendgrid.com/v3/suppression/unsubscribes?limit=50&offset=0>; rel="prev"; title="1", <https://api.sendgrid.com/v3/suppression/unsubscribes?limit=50&offset=400>; rel="last"; title="9", <https://api.sendgrid.com/v3/suppression/unsubscribes?limit=50&offset=0>; rel="first"; title="1"

Is there currently any way to access this response header using the typed client?

Off-topic: have you considered joining the GitHub Sponsors program? I enjoyed using StrongGrid in a project I worked on recently and I'd love to contribute back.

Metadata

Metadata

Assignees

Labels

Breaking ChangeThis change causes backward compatibility issue(s)

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions