Eggjs bodyparser did not take effect.

egg document says that egg comes with middleware bodyparser

then I posted an object in post body

like:

clipboard.png

 const { body } = ctx.request.body;
 console.log(typeof body); // return string 
Mar.05,2021

Content-Type is not set correctly.
x-www-form-urlencoded is passed to body-parser and parsed is a key-value key-value pair, and value is a string.
this is your

.

bodyparser

header: application/json

body:Raw
   {
     // something
   }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36f5c-2c083.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36f5c-2c083.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?