Closed lowbits closed 2 years ago
There isn't enough context for me to know what you're trying to accomplish. You say that there is no authorization header, but are you creating an interceptor with $fetch
to handle that use case? All I'm seeing is a snippet of fetch being used. Please provide a minimal reproduction.
Hey sorry for bothering you.
I think I found the solution.
So I switch from $fetch
, to $http.$patch
, the only problem I have now is $http.$patch is sending a HEADER METHOD 'patch', but the server only accepts 'PATCH', for $http.$post, $put, etc the method is sent in uppercase. Only the patch is not working.
I've updated the http module
I've updated the http module
@Teranode that is refered to other methods too? That problem also is resolved https://github.com/Teranode/nuxt-module-alternatives/issues/106#issuecomment-1291640986?
yes
Environment
Darwin
v16.17.0
3.0.0-rc.13
0.6.1
yarn@1.22.19
vite
app
,runtimeConfig
,modules
,css
,auth
,image
,proxy
,http
,build
@nuxtjs/tailwindcss@6.1.3
,@nuxtjs-alt/auth@2.0.30
,@nuxtjs-alt/http@1.4.2
,@nuxtjs-alt/proxy@2.0.4
,@pinia/nuxt@0.3.1
,@storyblok/nuxt@4.4.2
,@nuxt/image-edge@1.0.0-27769790.4b27db3
,@nuxtjs/i18n@8.0.0-beta.3
-
Reproduction
Describe the bug
when is use
$fetch()
for a GET request, the authorization header is set but when im using$fetch('/url', {method: 'POST'})
there is no AUTHORIZATION HEADER in the request, and I get a 401. Did i miss something?Additional context
No response
Logs
No response