motto - question - bodyParser.urlencoded 中设置 extended 为 true 和 false 有什么区别吗?


本文搜索关键字:motto node nodejs js javascript body-parser bodyparser urlencoded x-www-form-urlencoded extended


Answer:

如果设置为false,那么对URL-encoded的数据的解析采用querystring库;
如果设置为true,那么采用qs库,允许将富对象和数组编码为url编码格式,允许使用url编码的json体验。有关更多信息,请参阅qs库。
默认值为true,但是不赞成使用默认值。请研究qs和querystring之间的差异,选择合适的设置。。

猜你喜欢

转载自www.cnblogs.com/jzsz/p/9227109.html