buildCanonicalRequest fails when using query params
Opened this issue · 3 comments
instantdelay commented
buildCanonicalRequest
doesn't appear to work when query params are specified in the request. For example
signer.sign({
method: 'GET',
url: '/someurl',
params: { myId: 'abc' }
});
This line breaks because ws.uri.queryParams[key]
is a string and doesn't have sort(). It looks like this assumes the param values are always arrays. That's true if they came from SimpleQueryParser but normal params (merged with extend in prepare) are just strings/numbers.
I tried working around this by adding my own interceptor to wrap all may params in arrays but that doesn't work because Axios then appends []
to the key names.