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

Iainland/refactor history endpoint - split GET and POST handlers #206

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

imaitland
Copy link
Collaborator

HTTP standards demand GET requests do not include a body, all GET params must be passed as query elements.

@imaitland imaitland requested a review from amitschang November 11, 2024 20:00
@imaitland imaitland requested a review from a team as a code owner November 11, 2024 20:00
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Member

@amitschang amitschang left a comment

Choose a reason for hiding this comment

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

If I recall, I think that fastapi didn't handle the list type (vials, properties) from query parameters (GET) and while it does look like the server will process the body of GET, POST is more fitting for this.

I'm not sure this would work due to the list types, but even then, perhaps we just get rid of the GET in favor of only POST?

@imaitland
Copy link
Collaborator Author

ok got it, yeah we should have only one. I'm ok with POST only. Will make that change.

using GET and a body was causing the TS client to complain. whatwg/fetch#551

@imaitland imaitland force-pushed the iainland/refactor-history-endpoint branch from 3ef800f to 28f7f93 Compare November 11, 2024 20:26
@imaitland imaitland enabled auto-merge (squash) November 11, 2024 20:57
@imaitland imaitland merged commit fb75437 into main Nov 11, 2024
8 checks passed
@imaitland imaitland deleted the iainland/refactor-history-endpoint branch November 11, 2024 20:59
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