diff --git a/index.js b/index.js index 55499c5..62a9086 100644 --- a/index.js +++ b/index.js @@ -68,7 +68,7 @@ MaxCDN.prototype.get = function get(url, callback) { }; MaxCDN.prototype.put = function put(url, data, callback) { - this.oauth.put(this._makeUrl(url), '', '', this._makeQuerystring(data), this._parse(callback)); + this.oauth.put(this._makeUrl(url), '', '', this._makeObject(data), this._parse(callback)); }; MaxCDN.prototype.post = function post(url, data, callback) { diff --git a/test/index_test.js b/test/index_test.js index 4a24b2b..22cbd29 100644 --- a/test/index_test.js +++ b/test/index_test.js @@ -91,7 +91,7 @@ test('MaxCDN', function(t) { t.error(err, 'put w/o error'); t.equal(data.foo, 'bar', 'put w/ data'); t.equal(data.arguments[0], 'https://rws.maxcdn.com/alias/path', 'put w/ path'); - t.deepEqual(data.arguments[3], 'data=data', 'put sends data'); + t.deepEqual(data.arguments[3], { data: 'data' }, 'put sends data'); }); // post