From 8f25305ab2797a61bc6696ee644c303853896dc5 Mon Sep 17 00:00:00 2001 From: Harkirat Singh Date: Thu, 13 Jun 2019 06:09:52 +0530 Subject: [PATCH] Update index.md (#35322) * Update index.md Completion of the solution code. * fix: changed code to json --- .../use-body-parser-to-parse-post-requests/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guide/english/certifications/apis-and-microservices/basic-node-and-express/use-body-parser-to-parse-post-requests/index.md b/guide/english/certifications/apis-and-microservices/basic-node-and-express/use-body-parser-to-parse-post-requests/index.md index 6469e09500..3596e7fee3 100644 --- a/guide/english/certifications/apis-and-microservices/basic-node-and-express/use-body-parser-to-parse-post-requests/index.md +++ b/guide/english/certifications/apis-and-microservices/basic-node-and-express/use-body-parser-to-parse-post-requests/index.md @@ -6,7 +6,7 @@ title: Use body-parser to Parse POST Requests The body-parser should already be added to your project if you used the provided boilerplate, but if not it should be there as: -```code +```json "dependencies": { "body-parser": "^1.4.3", ... @@ -15,7 +15,9 @@ The body-parser should already be added to your project if you used the provided All you need to do for this challenge is pass the middleware to app.use(). Make sure it comes before the paths it needs to be used on. Remember that body-parser returns with `bodyParser.urlencoded({extended: false})`. Use the following as a template: ```javascript -app.use(middleware-function); +//app.use(middleware-function); +app.use(bodyParser.urlencoded({ extended: false })); + ``` Help our community expand these hints and guides.