Is it possible to have interceptor with useSanctumFetch()
?
#348
Answered
by
manchenkoff
nerdroid23
asked this question in
Q&A
-
I have this const { data, error } = await useSanctumFetch(
URL,
{
method: "PATCH",
body: {
title,
},
onRequest() {
// show loading indicator
},
onResponse() {
// hide loading indicator
},
},
); |
Beta Was this translation helpful? Give feedback.
Answered by
manchenkoff
Apr 7, 2025
Replies: 1 comment
-
Hey @nerdroid23, sure thing, please check the docs - https://manchenkoff.gitbook.io/nuxt-auth-sanctum/advanced/interceptors. Unfortunately, ofetch does not support preserving the already assigned interceptor, so we have to go this way. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
manchenkoff
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @nerdroid23, sure thing, please check the docs - https://manchenkoff.gitbook.io/nuxt-auth-sanctum/advanced/interceptors. Unfortunately, ofetch does not support preserving the already assigned interceptor, so we have to go this way.