How to add custom headers in react query ? #3602
Answered
by
TkDodo
aasimafridi44
asked this question in
Q&A
-
Hi, |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
May 11, 2022
Replies: 2 comments 6 replies
-
headers are out of scope for react-query. It depends solely on what you use for data fetching (fetch, axios, ky, graphql-request, ...) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
louis-young
-
You can try utilizing the meta option that gets passed to your defaultQueryFn. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
headers are out of scope for react-query. It depends solely on what you use for data fetching (fetch, axios, ky, graphql-request, ...)