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

prevent okhttp post with null body #89

Merged
merged 1 commit into from
Dec 29, 2022
Merged

Conversation

n0ise9914
Copy link
Contributor

Okhttp doesn't let to send post requests with null body, and also the body (with empty json object) is required by hetzner cloud api.

Your latest changes (migrating to okhttp) broke our automation tool, all post requests with null body are broken right now, like reset-server request and so on...

Passing empty json object whenever the body is null did the trick cause it's required by both okhttp and hetzner cloud api.

okhttp doesn't let to send post requests with null body, and also the body (with empty json object) is required by hetzner cloud api.
Copy link
Owner

@tomsiewert tomsiewert left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for your contribution!

@tomsiewert tomsiewert merged commit 4518740 into tomsiewert:main Dec 29, 2022
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