简体   繁体   中英

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. If you do not plan to have your application accept POST requests, then you do not need this middleware, otherwise it is quite essential.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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