mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-05-31 00:00:07 +08:00
- increment version
- update changelog - improve query params spec
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 2.0.7
|
||||
|
||||
- Fixed #195: URLs are double-encoded on Android
|
||||
|
||||
## 2.0.6
|
||||
|
||||
- Fixed #187: setSSLCertMode with "default" throws an error on Android
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cordova-plugin-advanced-http",
|
||||
"version": "2.0.6",
|
||||
"version": "2.0.7",
|
||||
"description": "Cordova / Phonegap plugin for communicating with HTTP servers using SSL pinning",
|
||||
"scripts": {
|
||||
"updatecert": "node ./scripts/update-test-cert.js",
|
||||
|
||||
@@ -551,7 +551,7 @@ const tests = [
|
||||
},
|
||||
{
|
||||
description: 'should not double encode spaces in url path #195',
|
||||
expected: '',
|
||||
expected: 'resolved: {"status": 200, "data": "{\\"url\\":\\"https://httpbin.org/anything/containing spaces in url\\" ...',
|
||||
func: function(resolve, reject) { cordova.plugin.http.get('https://httpbin.org/anything/containing%20spaces%20in%20url', {}, {}, resolve, reject); },
|
||||
validationFunc: function(driver, result) {
|
||||
result.type.should.be.equal('resolved');
|
||||
@@ -560,7 +560,7 @@ const tests = [
|
||||
},
|
||||
{
|
||||
description: 'should encode spaces in url query correctly',
|
||||
expected: '',
|
||||
expected: 'resolved: {"status": 200, "data": "{\\"url\\":\\"https://httpbin.org/anything?query key=very long query value with spaces\\" ...',
|
||||
func: function(resolve, reject) { cordova.plugin.http.get('https://httpbin.org/anything', { 'query key': 'very long query value with spaces' }, {}, resolve, reject); },
|
||||
validationFunc: function(driver, result) {
|
||||
result.type.should.be.equal('resolved');
|
||||
|
||||
@@ -184,9 +184,12 @@ describe('URL util', function () {
|
||||
|
||||
it('serializes query params correctly', () => {
|
||||
util.serializeQueryParams({
|
||||
param1: 'value with spaces',
|
||||
param2: 'value with special character äöü%'
|
||||
}, false).should.equal('param1=value with spaces¶m2=value with special character äöü%');
|
||||
strParam1: 'value with spaces',
|
||||
strParam2: 'value with special character äöü%',
|
||||
boolParam: true,
|
||||
numberParam: 1,
|
||||
nullParam: null,
|
||||
}, false).should.equal('strParam1=value with spaces&strParam2=value with special character äöü%&boolParam=true&numberParam=1&nullParam=null');
|
||||
});
|
||||
|
||||
it('serializes query params correctly with URL encoding enabled', () => {
|
||||
|
||||
Reference in New Issue
Block a user