简体   繁体   English

下面的代码片段需要什么,我可以摆脱它吗?

[英]What is the need for the code snippet below, and can I get rid of it?

Please keep in mind that I am building an application that will handle very sensitive data.请记住,我正在构建一个将处理非常敏感数据的应用程序。

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

The main function of body parser is to allow you to parse the body of a POST request to your Express webserver.正文解析器的主要功能是允许您解析发往 Express 网络服务器的 POST 请求正文。 If you do not plan to have your application accept POST requests, then you do not need this middleware, otherwise it is quite essential.如果您不打算让您的应用程序接受 POST 请求,那么您不需要这个中间件,否则它是非常必要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM