0

I'm learning Express. While doing a tutorial, the tutor used express.urlencoded({extended: false}). I learned what url-encoding is, and I've read descriptions on the true or false values for the extended option, but I'm still not sure why we have to put extended: false in this app. I know it's because we are storing input from a form, and that input has to be parsed to be usable in the req.body object. But the best documentation on the extended option says that a true value uses the qs library and allows for rich objects and arrays in our body object, whereas false uses the querystring library which only allows a string or an array.

I still don't understand why we set extended to false.

  • Refer to https://stackoverflow.com/questions/29960764/what-does-extended-mean-in-express-4-0 for more explanation of qs vs query-string – Mastermind May 18 '22 at 13:41

0 Answers0