Skip to content

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

Closed
@beyondliu

Description

@beyondliu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions