Replies: 1 comment 4 replies
-
Yes, you can use your fetcher for that, if you need to dynamically pass params you can use an array as a key of useSWR, something like this: useSWR([url, headerValue], fetcher) And now your fetcher will be implemented as function fetcher(url, headerValue) { ... } |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, Im pretty new to this I want to get data with useSwr, but I need to pass in headers to my endpoint. I've tried this as my fetch
and my URL looks like this
Is this the right way to do this?
Beta Was this translation helpful? Give feedback.
All reactions