My question: Why i am getting this issue?
Details (like screenshots):
How I found the problem:
I have also written my router.js file code for clear understanding.
const express = require('express');
const router = express.Router();
// GET ALL API
router.get('/getAll', (req , res) => {
res.send('Gettting All The Data')
})
// GET By ID API
router.get('/getOne/:id', (req , res) => {
res.send("ID : ${req.params.id}")
})
// POST API
router.post('/post', (req , res) => {
res.send('POST Method')
})
// PUT API
router.put('/put', (req , res) => {
res.send('PUT METHOD')
})
//DELETE API
router.delete('/delete', (req , res) => {
res.send('DELETE Method')
})
module.exports = router;
I’ve already tried:
- ALready tried all the method available online