any-http-request
Advanced tools
Comparing version 0.1.4 to 0.1.5
{ | ||
"name": "any-http-request", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "AnyHTTP adapter for the Node request library", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/argo-rest/any-http-request", |
@@ -37,3 +37,3 @@ import request from 'request'; | ||
body: responseBody, | ||
headers: Object.mixin(response.headers, { | ||
headers: Object.assign(response.headers, { | ||
'Content-Type': response.headers['content-type'], | ||
@@ -68,3 +68,3 @@ 'Location': response.headers['location'] | ||
get (uri, params, options = {}) { | ||
const opts = Object.mixin({}, this.baseOptions, options); | ||
const opts = Object.assign({}, this.baseOptions, options); | ||
return makeRequest('GET', uri, params, opts); | ||
@@ -74,3 +74,3 @@ } | ||
post (uri, data, options) { | ||
const opts = Object.mixin({}, this.baseOptions, options); | ||
const opts = Object.assign({}, this.baseOptions, options); | ||
return makeRequest('POST', uri, data, opts); | ||
@@ -80,3 +80,3 @@ } | ||
put (uri, data, options) { | ||
const opts = Object.mixin({}, this.baseOptions, options); | ||
const opts = Object.assign({}, this.baseOptions, options); | ||
return makeRequest('PUT', uri, data, opts); | ||
@@ -86,3 +86,3 @@ } | ||
patch (uri, data, options) { | ||
const opts = Object.mixin({}, this.baseOptions, options); | ||
const opts = Object.assign({}, this.baseOptions, options); | ||
return makeRequest('PATCH', uri, data, opts); | ||
@@ -92,5 +92,5 @@ } | ||
delete (uri, options) { | ||
const opts = Object.mixin({}, this.baseOptions, options); | ||
const opts = Object.assign({}, this.baseOptions, options); | ||
return makeRequest('DELETE', uri, null, opts); | ||
} | ||
} |
28120
10