JSON - noppoMan/Slimane GitHub Wiki
Request
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
}