Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible parameter handling in NewRequest and friends #959

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

brandonc
Copy link
Collaborator

@glennsarti noted that go-tfe demonstrated some odd query parameter encoding behavior depending on http method, and that url.QueryEncode was used throughout the code when we actually should have used the slightly more narrow url.PathEncode.

@glennsarti
Copy link
Contributor

the tfe.go changes look good. Just need to appease the almighty lint deity!

- additionalQueryParams should be used for all request methods
- reqBody should be encoded as url query parameters for GET requests
@brandonc brandonc force-pushed the brandonc/query_params_on_non_get_requests branch from 1e85b0d to 417505b Compare August 13, 2024 00:55
@glennsarti
Copy link
Contributor

Ship it

@brandonc brandonc merged commit 82f0a06 into main Aug 14, 2024
7 checks passed
@brandonc brandonc deleted the brandonc/query_params_on_non_get_requests branch August 14, 2024 00:33
Copy link

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants