Comparing version 1.9.1 to 1.9.2
@@ -58,3 +58,2 @@ module.exports = { | ||
let requestHeaders = {} | ||
const options = { | ||
@@ -67,18 +66,3 @@ method, | ||
auth, | ||
validateStatus: status => true, | ||
transformRequest: (data, headers) => { | ||
// Collect the headers which will be sent to the | ||
const methodHeaders = headers[r.toLower(method)] || {} | ||
const commonHeaders = headers.common || {} | ||
const otherHeaders = r.compose( | ||
r.fromPairs, | ||
r.filter( | ||
r.complement((pair) => [ | ||
'common', 'delete', 'get', 'head', 'post', 'put', 'patch' | ||
].includes(pair[0])) | ||
), | ||
r.toPairs | ||
)(headers) | ||
requestHeaders = {...methodHeaders, ...commonHeaders, ...otherHeaders} | ||
} | ||
validateStatus: status => true | ||
} | ||
@@ -89,6 +73,6 @@ | ||
require('axios')(options) | ||
.then(resp => { | ||
.then(res => { | ||
watch.stop() | ||
const {data, headers, status, statusText} = resp | ||
const {data, headers, status, statusText} = res | ||
const [codeColored, textColored] = colorCode(status, statusText) | ||
@@ -132,2 +116,10 @@ | ||
const requestHeaders = r.compose( | ||
r.fromPairs, | ||
r.map(r.split(':')), | ||
r.tail, | ||
r.filter(r.complement(r.equals(''))), | ||
r.map(r.trim) | ||
)(r.split('\n')(res.request._header)) | ||
const maxRequestHeaderLength = r.compose( | ||
@@ -134,0 +126,0 @@ r.reduce(r.max, 0), |
{ | ||
"name": "aqui", | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"description": "Simple CLI HTTP utilities", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
413818
335