-
Notifications
You must be signed in to change notification settings - Fork 6
JSON
Yuki Takei edited this page Oct 10, 2016
·
3 revisions
Register BodyParser.JSON
into the middleware chains.
Can get parsed requested json body throgh the req.json
when content-type is application/json
.
req.json
returns SwiftyJSON.JSON?
app.use(BodyParser.JSON())
app.use { request, _, _ in
request.json!["foo"]!.string
}