Skip to content

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

Closed

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.

Activity

  1. added a commit that references this issue on Jun 8, 2018
    d4c1a8c
  2. added a commit that references this issue on Jun 9, 2018
    6dd8774
  3. locked as resolved and limited conversation to collaborators on Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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