Skip to content

Expose headers on use query hooks #182

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

Open
trabati opened this issue Apr 7, 2025 · 0 comments
Open

Expose headers on use query hooks #182

trabati opened this issue Apr 7, 2025 · 0 comments

Comments

@trabati
Copy link

trabati commented Apr 7, 2025

Is your feature request related to a problem? Please describe.
Many APIs use X-Total-Count as a Header for pagination.
Also, other headers might be useful and should be exposed to the user.

Describe the solution you'd like
along with data, a headers property should be returned from a useQuery hook.
Or data should provide the body and headers

Right now it is impossible to access the headers from query hooks.

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

No branches or pull requests

1 participant