Skip to content

SWR support header parameters? #466

Answered by sergiodxa
rootlinux2 asked this question in General
Discussion options

You must be logged in to vote

In your fetcher you can use any header you want, if you want to receive them dynamically you can pass an array as key of useSWR

function fetcher(url, token) {
  // fetch
}

useSWR([endpoint, token], fetcher)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rootlinux2
Comment options

Answer selected by rootlinux2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants