From 15ff3a00d4fce0ca066244d4bcfb19e2a3c03cd2 Mon Sep 17 00:00:00 2001 From: Christophe Desguez Date: Thu, 11 Jun 2015 17:25:24 +0200 Subject: [PATCH] Added postJson and putJson to the Service wrapper prototype The first thig that i tried.... create a service wrapper for a JSON API (which API is not JSON today?) and... bingo.. it was missing..! --- lib/restler.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/restler.js b/lib/restler.js index 3d7945b..fdecdc1 100644 --- a/lib/restler.js +++ b/lib/restler.js @@ -493,6 +493,12 @@ mixin(Service.prototype, { json: function(method, path, data, options) { return json(this._url(path), data, this._withDefaults(options), method); }, + postJson: function(path, data, options) { + return postJson(this._url(path), data, this._withDefaults(options)); + }, + putJson: function(path, data, options) { + return putJson(this._url(path), data, this._withDefaults(options)); + }, del: function(path, options) { return del(this._url(path), this._withDefaults(options)); },