ILLuMiNaTe
ILLuMiNaTe
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
I doubt this is a cors issue. If it was it would have been logged in the console log and it would have thrown an error. Nuxt3 can send a preflight options request when fetching. The preflight request also doesnt hold any request data. However the second request is what matters. In this scenario the request is timing out because the POST request is not reaching the server. Hence its timing out and the await does not continue. I would first look whether the server accepts the post request at all. Do this with Postman
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
Try to make a request with Postman to your API and see if that works 🙂
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
Hence your server cannot answer your request
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
Its just a regular get and not a post
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
One thing i can see is that the request method is somehow not set in that request.
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
The payload tab
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
And then send that screenshot again 🙂
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
The other one
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
And thats correct that always happens.
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
Of the fetch request which is pending
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
I meant the request tab here 🙂
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
Can you show the body of the fetch?
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
You are currently sending a string with json headers
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
Sadly i do not happen to have a pc to test it myselg on hand. But what happens if you remove the json.stringify wrapper and just send the body object?
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
204 status would be a bit odd
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
Also double check if localhost:3001 is correct since you are most likely using port 3000 as seen at your other code.
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
Can you open your network tap and check the status of the request?
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
If so there is an issue with your auth endpoint timing out. Which usually takes ~30seconds
94 replies
NNuxt
Created by Aldebaran on 6/18/2024 in #❓・help
$fecth not working properly
@Aldebaran If you remove the await on the fetch do they appear?
94 replies
NNuxt
Created by ILLuMiNaTe on 4/13/2024 in #❓・help
Issue with Nuxt3 UI Carousel.
<script setup lang="ts">
const items = [
'https://picsum.photos/600/800?random=1',
'https://picsum.photos/600/800?random=2',
'https://picsum.photos/600/800?random=3',
'https://picsum.photos/600/800?random=4',
'https://picsum.photos/600/800?random=5',
'https://picsum.photos/600/800?random=6'
]
</script>

<template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="w-64 mx-auto rounded-lg overflow-hidden">
<img :src="item" class="w-full" draggable="false">
</UCarousel>
</template>
<script setup lang="ts">
const items = [
'https://picsum.photos/600/800?random=1',
'https://picsum.photos/600/800?random=2',
'https://picsum.photos/600/800?random=3',
'https://picsum.photos/600/800?random=4',
'https://picsum.photos/600/800?random=5',
'https://picsum.photos/600/800?random=6'
]
</script>

<template>
<UCarousel v-slot="{ item }" :items="items" :ui="{ item: 'basis-full' }" class="w-64 mx-auto rounded-lg overflow-hidden">
<img :src="item" class="w-full" draggable="false">
</UCarousel>
</template>
2 replies