I've encountered an issue where using the @nuxt/http this.$http.post and this.$http.patch methods is causing problems with parsing body parameters during posting. Strangely, it used to work perfectly fine before, leaving me unsure of where to even begin troubleshooting.
Is there anyone who could provide some guidance on how I can start looking for a solution?
Thank you
Here's how my client code looks:
await this.$http.patch("http://localhost:3000/api/tasks/${task.id}",{task:"rando info here"})
And in my app.js express server, it is configured like this:
app.use(express.json({strict:false}));
app.use(bodyParser.urlencoded({ extended: true }));
app.use('/tasks', taskRouter)
In my routes/tasks.js file, the patch method is implemented as follows:
router.patch('/:taskId', function(req,res,next){
console.log(req.body)
#a bunch of sql related code
})
This setup allows me to monitor what's happening behind the scenes.