-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge query parameters coming from path with
params
argument
If specifying both query parameters in a path/URL down to Faraday (e.g., `/v1/invoices/upcoming?coupon=25OFF`) _and_ query parameters in a hash (e.g., `{ customer: "cus_123" }`), it will silently overwrite the ones in the path with the ones in the hash. This can cause problems where some critical parameters are discarded and causes an error, as seen in issue #646. This patch modifies `#execute_request` so that before going out to Faraday we check whether the incoming path has query parameters. If it does, we decode them and add them to our `query_params` hash so that all parameters from either place are preserved. Fixes #646.
- Loading branch information
Showing
3 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters