When creating a webservice using Restify, you may want to be able to handle data POSTed to your API. Have a look at our article about creating a RESTful webservice in node.js for the basics on setting up the server and routing the requests. In that article you see that you use the following code to route a POST request to your handler function.
OK, so now all POST requests will be sent to the my_post_handler function. The problem is that the data being POSTed to the server needs to be properly parsed so that it can be easily handled by your script. This is where the Restify plugin bodyParser comes into play. The plugin can be used easily by simply adding the following line of code before your post handler. So setting up your routes would look something like this.