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

http_request method of Gitlab class should accept None as the default value for param post_data #521

Closed
beyondliu opened this issue Jun 8, 2018 · 0 comments

Comments

@beyondliu
Copy link
Contributor

beyondliu commented Jun 8, 2018

http_request method of Gitlab class (in the file __init__.py) should accept None as the default value for param post_data.

For some caching servers, they reject HTTP GET request with body. If post_data's default value is {}, the request body of a GET request will get content b'{}' with Content-length header, which some caching server will just respond with an error. To maximize the support, I feel it suitable to change post_data's default value to None. Also it is not best practice in Python to use a mutable default value as an argument.

I didn't have time to read all the code. So let me know if this change is appropriate.

gpocentek pushed a commit that referenced this issue Jun 9, 2018
fix #521 change post_data default value to None
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant