@wix/be-http-binding
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -109,3 +109,3 @@ | ||
return flattenedValues.map(({value, path}) => `${path}=${value}`); | ||
return flattenedValues.map(({value, path}) => `${encodeURI(path)}=${encodeURI(value)}`).join('&'); | ||
} | ||
@@ -112,0 +112,0 @@ |
@@ -41,2 +41,23 @@ const {http, get, post, put} = require('./http-binding'); | ||
it('should invoke the GET method with multiple values', async() => { | ||
const givenMethod = http(get('/pass'), message, message, {invoker}); | ||
const result = await givenMethod.invoke({ | ||
a: 1, | ||
b: 2 | ||
}); | ||
expect(result).to.deep.equal({ | ||
a: 1, | ||
b: 2 | ||
}); | ||
expect(invoker.invocations()).to.have.length(1); | ||
expect(invoker.invocations()[0]).to.deep.equal({ | ||
method: 'get', | ||
uri: '/pass?a=1&b=2', | ||
message: undefined | ||
}); | ||
}); | ||
it('should invoke a POST method', async() => { | ||
@@ -43,0 +64,0 @@ const givenMethod = http(post('/pass'), message, message, {invoker}); |
@@ -24,3 +24,8 @@ | ||
} | ||
}, | ||
StringValue: { | ||
fromValue(value) { | ||
return value ? value.toString() : null; | ||
} | ||
} | ||
}; |
{ | ||
"name": "@wix/be-http-binding", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"author": "Mantas Indrašius <mantasi@wix.com>", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
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
33459
564