From 576f41934cc34bcb31b385b9fc543d1b066564ea Mon Sep 17 00:00:00 2001 From: Kahmali Rose Date: Mon, 10 Nov 2014 15:18:45 -0500 Subject: [PATCH] Allow PATCH method in api requests PATCH is an HTTP method used for partially updating a resource, and can include URL parameters as well as a request body. For more information on the PATCH method, see RFC 5789 (http://tools.ietf.org/html/rfc5789). --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index cee81dc..b70db96 100644 --- a/server.js +++ b/server.js @@ -51,7 +51,7 @@ _RESTstop.prototype.match = function(request, response) { for (var key in context.params) args.push(context.params[key]); - if(request.method == "POST" || request.method == "PUT") { + if(request.method == "POST" || request.method == "PUT" || request.method == "PATCH") { _.extend(context.params, request.body); } if(request.method == "GET" || _.size(request.query)) {