While i'm using axios to fetch data it's return 304 on React . But it's work on Postman !
const [mangas, setMangas] = useState([])
useEffect(() => {
const getMangas = async () => {
const res = await axios.get('/mangas')
setMangas(res.data)
}
getMangas()
}, [])
console.log(mangas)
::ffff:127.0.0.1 - - [16/Aug/2021:10:34:12 +0000] "GET /api/mangas HTTP/1.1" 304 -
Morgan return this message on React!
router.get('/', async (req, res) => {
try {
const mangas = await Manga.find()
res.status(200).json(mangas.reverse())
} catch (err) {
res.status(500).json(err)
}
})
::1 - - [16/Aug/2021:10:34:44 +0000] "GET /api/mangas HTTP/1.1" 200 5763
this is from Postman!
i tried to clear Browser'Cache but it doen't work