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

[chore] Use query for GET/DELETE requests, per HTTP spec #229

Merged
merged 4 commits into from
Aug 7, 2024
Merged

Conversation

nwithan8
Copy link
Contributor

@nwithan8 nwithan8 commented Aug 5, 2024

Description

  • Update client logic to use query parameters for GET/DELETE requests and body for POST/PUT/PATCH requests
  • Consolidate .get, .post, .delete, etc. functions to single .do
  • Denote URL and JSON key names for parameter serialization

No changes to end-user experience or user-facing function signatures

Testing

  • Re-record all cassettes (due to parameter schema changes, fixture updates, expiration)

Pull Request Type

Please select the option(s) that are relevant to this PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc.)

- Denote URL vs JSON key names for parameter serialization
- Re-record all cassettes
@nwithan8 nwithan8 requested a review from a team August 5, 2024 16:12
@nwithan8 nwithan8 marked this pull request as draft August 5, 2024 16:14
@nwithan8 nwithan8 marked this pull request as ready for review August 5, 2024 16:16
Copy link
Member

@Justintime50 Justintime50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only blocking until I can take a solid look at this. You weren't kidding, this is beefy. Probably necessitates a breaking-change release, thoughts? We can do that shortly as we have a few other items that can pair with it if we decide to go that route.

Copy link
Contributor

@jchen293 jchen293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, didn't find any typo or issue. Would be good to have another eyes on this PR

client.go Show resolved Hide resolved
@jchen293
Copy link
Contributor

jchen293 commented Aug 5, 2024

Only blocking until I can take a solid look at this. You weren't kidding, this is beefy. Probably necessitates a breaking-change release, thoughts? We can do that shortly as we have a few other items that can pair with it if we decide to go that route.

I don't think it's a breaking change unless users have VCR cassettes with our Client Libs API interaction, then it could fail the tests. We already merged the Ruby PR for this change, so we have to make a call if we should hold off on the Ruby until the next breaking change.

Copy link
Member

@Justintime50 Justintime50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Nice work here!

I would like to see the function suggestion investigated, I think it'd be worthwhile to make a single unified interface since there are hundreds of callsites that could benefit from it.

insurance.go Show resolved Hide resolved
pickup.go Outdated Show resolved Hide resolved
@nwithan8 nwithan8 merged commit 0dede49 into master Aug 7, 2024
10 checks passed
@nwithan8 nwithan8 deleted the http_spec branch August 7, 2024 18:09
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.

3 participants