Monday, 7 October 2019

Do I need to use a body parser middleware in my Express app?

So I have a backend service that has POST and PUT endpoints that take in some query parameters (?userName=name&age=16). I was told that I should add this middleware into my express backendapp.use(express.urlencoded({extended: true})); app.use(express.json()); I am not really sure what they do, does anyone know if this is good practice?

Submitted October 07, 2019 at 07:25PM by Maegar

No comments:

Post a Comment