Comparing version 1.0.3 to 1.0.4
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "./src/easysoap.js", | ||
@@ -11,0 +11,0 @@ "dependencies": { |
@@ -18,2 +18,21 @@ (function() { | ||
function baseParamsToRequestParams(baseParams) { | ||
var requestParams = _.extend({}, baseParams); | ||
if (requestParams.headers) { | ||
if (_.isArray(requestParams.headers)) { | ||
requestParams.headers = _.reduce(requestParams.headers, | ||
(store, headerItem) => { | ||
store[headerItem.name] = headerItem.value; | ||
return store; | ||
}, | ||
{}); | ||
} | ||
} | ||
return requestParams; | ||
} | ||
function getProtocol(opts) { | ||
@@ -109,3 +128,3 @@ | ||
return wsdlrdr.getMethodParamsByName(callParams.method, baseParams, opts) | ||
return wsdlrdr.getMethodParamsByName(callParams.method, baseParamsToRequestParams(baseParams), opts) | ||
.then((methodParams) => { | ||
@@ -112,0 +131,0 @@ |
32541
538