“延伸”是什么意思在快递4.0? [英] What does 'extended' mean in express 4.0?

查看:149
本文介绍了“延伸”是什么意思在快递4.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  app.use(bodyParser.urlencoded({ extended:false})); 

但是,扩展在express 4.0中是什么意思?



我发现这个

 扩展 - 使用qs模块解析扩展语法。 

但是,我仍然不能低估这意味着什么。

解决方案

如果扩展 false ,你不能发布嵌套对象

  person [name] ='cw'

//嵌套对象= {person:{name:cw}}

如果扩展 true ,你可以做任何你喜欢的方式。


I'm using express and also body-parser in my app.

app.use(bodyParser.urlencoded({ extended: false }));

But, What does 'extended' mean in express 4.0?

I found this

extended - parse extended syntax with the qs module.

However, I still can't understrand what it means.

解决方案

If extended is false, you can not post "nested object"

person[name] = 'cw'

// Nested Object = { person: { name: cw } }

If extended is true, you can do whatever way that you like.

这篇关于“延伸”是什么意思在快递4.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆