Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Create Links from "complex" headers #2402

Open
meastp opened this issue Nov 6, 2020 · 1 comment
Open

Question: Create Links from "complex" headers #2402

meastp opened this issue Nov 6, 2020 · 1 comment

Comments

@meastp
Copy link

meastp commented Nov 6, 2020

I'm using the HTTP Link header for pagination in my API.

e.g. GET /items?limit=10&filter=active

returns a Link-header with Link: <https://example.com/features?limit=10&filter=active&cursor=a34Dsdf>; rel="next"

What I would like is for the auto-generation tools to be able to create a method e.g. "getNextPortion" that uses the parameters from the Link header to get the next n items.

Is this possible, or must I use "primitive" headers containing single integers and strings?

@MikeRalphson
Copy link
Member

MikeRalphson commented Nov 6, 2020

Note: worth keeping an eye on the progress of the structured fields draft on its path to becoming an RFC. See also #1980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants