mappersmith
Advanced tools
Comparing version 2.18.0 to 2.19.0
@@ -43,2 +43,5 @@ 'use strict'; | ||
}, | ||
head: function head() { | ||
this.performRequest('head'); | ||
}, | ||
post: function post() { | ||
@@ -45,0 +48,0 @@ this.performRequest('post'); |
@@ -39,2 +39,5 @@ 'use strict'; | ||
}, | ||
head: function head() { | ||
this.performRequest('head'); | ||
}, | ||
post: function post() { | ||
@@ -41,0 +44,0 @@ this.performRequest('post'); |
@@ -23,2 +23,5 @@ 'use strict'; | ||
}, | ||
head: function head() { | ||
this.callMock(); | ||
}, | ||
post: function post() { | ||
@@ -25,0 +28,0 @@ this.callMock(); |
@@ -34,2 +34,10 @@ 'use strict'; | ||
}, | ||
head: function head() { | ||
var xmlHttpRequest = this.createXHR(); | ||
xmlHttpRequest.open('HEAD', this.request.url(), true); | ||
this.setHeaders(xmlHttpRequest, {}); | ||
this.configureTimeout(xmlHttpRequest); | ||
this.configureBinary(xmlHttpRequest); | ||
xmlHttpRequest.send(); | ||
}, | ||
post: function post() { | ||
@@ -36,0 +44,0 @@ this.performRequest('post'); |
@@ -18,3 +18,3 @@ 'use strict'; | ||
/* global VERSION */ | ||
var version = exports.version = '2.18.0'; | ||
var version = exports.version = '2.19.0'; | ||
@@ -21,0 +21,0 @@ var configs = exports.configs = { |
@@ -17,10 +17,11 @@ 'use strict'; | ||
response: function response(next) { | ||
var endedAt = Date.now(); | ||
return next().then(function (response) { | ||
var endedAt = Date.now(); | ||
var startedAt = response.request().headers()['x-started-at']; | ||
return next().then(function (response) { | ||
return response.enhance({ | ||
headers: { | ||
'X-Started-At': response.request().headers()['x-started-at'], | ||
'X-Started-At': startedAt, | ||
'X-Ended-At': endedAt, | ||
'X-Duration': endedAt - response.request().headers()['x-started-at'] | ||
'X-Duration': endedAt - startedAt | ||
} | ||
@@ -27,0 +28,0 @@ }); |
{ | ||
"name": "mappersmith", | ||
"version": "2.18.0", | ||
"version": "2.19.0", | ||
"description": "It is a lightweight rest client for node.js and the browser", | ||
@@ -5,0 +5,0 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105027
2071