ParadoxLector
ParadoxLector
NNuxt
Created by ParadoxLector on 6/3/2024 in #❓・help
Posting using $fetch
This is how it worked in the end:
const data = await $fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
"application_id": APPLICATION_ID,
"access_token": access_token,
})
})
const data = await $fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({
"application_id": APPLICATION_ID,
"access_token": access_token,
})
})
8 replies
NNuxt
Created by ParadoxLector on 6/3/2024 in #❓・help
Posting using $fetch
I have tried using Insomia and it works like this: POST to URL, structured as Form URL encoded. How do I translate it to my code?
const data = await $fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: {
"application_id": APPLICATION_ID,
"access_token": access_token,
}
})
const data = await $fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: {
"application_id": APPLICATION_ID,
"access_token": access_token,
}
})
This still doesn't work...
8 replies
NNuxt
Created by ParadoxLector on 6/3/2024 in #❓・help
Posting using $fetch
https://api.server.com/logout/ Is not really my server but a third party service.
8 replies