@bbc/http-transport
Advanced tools
Comparing version 4.4.4 to 4.4.5
@@ -64,3 +64,3 @@ 'use strict'; | ||
const delimiter = this.hasBaseQueries() ? '&' : '?'; | ||
return `${this._baseUrl}${delimiter}${qs.stringify(this._queries)}`; | ||
return `${this._baseUrl}${delimiter}${qs.stringify(this._queries, { arrayFormat: 'repeat' })}`; | ||
} | ||
@@ -67,0 +67,0 @@ |
{ | ||
"name": "@bbc/http-transport", | ||
"version": "4.4.4", | ||
"version": "4.4.5", | ||
"description": "A flexible, modular REST client built for ease-of-use and resilience.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -68,6 +68,6 @@ 'use strict'; | ||
it('uri-encodes multi-parameter queries', () => { | ||
it('adds multi-parameter queries correctly', () => { | ||
const request = Request.create(); | ||
request.baseUrl(HOST).addQuery('a', [1, 2]); | ||
assert.equal(request.getUrl(), HOST + '?a%5B0%5D=1&a%5B1%5D=2'); | ||
assert.equal(request.getUrl(), HOST + '?a=1&a=2'); | ||
}); | ||
@@ -74,0 +74,0 @@ }); |
386909