Closed heisler3030 closed 9 years ago
There's a workaround to this problem right now (don't pass the token as an argument, add it to the path) so I'd call this a medium to low priority bug. Might be worth fixing when we fix the other bug.
Proposed fix: https://github.com/bitpay/ruby-client/pull/41
Fixed with merge as above
Because
client.get
appends?token=<token>
directly to the passed GET path, this causes issues if query params are already attached, because now there are two ?'s in the string.Proposed fix: add logic to substitute & if there is already a ? in the path.
Test case:
client.get(path: "ledgers/BTC?startDate=2015-01-01&endDate=2015-02-01" token: token)