Skip to content

feat: default to POST instead of GET when body is given #73

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

Merged

Conversation

FlorianLoch
Copy link
Contributor

I am not sure checking whether method has actually been set might be too much - using GET with a body probably never makes sense, so one could probably also set it to POST even if GET has been set explicitly? 🤔

On the other hand, this also covers the case of a user explicitly using another, legit, method.

@FlorianLoch
Copy link
Contributor Author

Closes #72.

@six-ddc
Copy link
Owner

six-ddc commented Mar 5, 2023

Although it is not common for GET requests to have a request body, it should be considered permissible.

@six-ddc
Copy link
Owner

six-ddc commented Mar 5, 2023

LGTM

@FlorianLoch
Copy link
Contributor Author

Although it is not common for GET requests to have a request body, it should be considered permissible.

Alright, then the currently suggested implementation should match that. Just double checked, should be fine.

Just noticed the help string of the body parameters was a little hard to read - added a commit suggesting an improvement. For ease of workflow I simply (ab)used this PR for it ;)

@six-ddc six-ddc merged commit ee2b6e0 into six-ddc:main Mar 5, 2023
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.

None yet

2 participants