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

Avoid sending empty JSON body when no params to api command #6775

Merged
merged 2 commits into from Dec 22, 2022

Conversation

mislav
Copy link
Contributor

@mislav mislav commented Dec 22, 2022

Allows e.g. HTTP DELETE requests with an empty body instead of body being {} when no params were given.

This is a backwards incompatible change, but I am unaware of GitHub API endpoints that require an empty payload of {} and do not accept an empty request body instead.

Fixes #3937

@mislav mislav requested a review from a team as a code owner December 22, 2022 20:18
@mislav mislav requested review from samcoe and removed request for a team December 22, 2022 20:18
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Dec 22, 2022
@mislav mislav merged commit 6a55324 into trunk Dec 22, 2022
The GitHub CLI automation moved this from Needs review 🤔 to Pending Release 🥚 Dec 22, 2022
@mislav mislav deleted the api-empty-params branch December 22, 2022 20:45
@github-actions github-actions bot moved this from Pending Release 🥚 to Done 💤 in The GitHub CLI Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
The GitHub CLI
  
Done 💤
Development

Successfully merging this pull request may close these issues.

Allow nil request body for non-GET request
1 participant