This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var restify = require('restify'); | |
// create server | |
var server = restify.createServer(); | |
// Blocks your chain on reading and parsing the HTTP request body. | |
// Switches on Content-Type and does the appropriate logic. | |
// application/json, application/x-www-form-urlencoded and multipart/form-data are currently supported. | |
server.use(restify.bodyParser({rejectUnknown: true})); |