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

change request parameter key 'body' to 'bodyData' #65

Closed
wants to merge 1 commit into from
Closed

change request parameter key 'body' to 'bodyData' #65

wants to merge 1 commit into from

Conversation

huynq2007
Copy link

@huynq2007 huynq2007 commented Jun 19, 2019

some Api does have body as a query parameters.
It' better to change request body data to bodyData
#64

@gene1wood
Copy link
Collaborator

I'm reluctant to solve this this way because

  • It just moves the problem from a name collision with body to bodyData that, though is likely to occur less frequently (based on the assumption that APIs in the world use the term body more frequently than bodyData), isn't really a fix
  • uses non PEP008 camel case variable names
  • would be backwards incompatible. This would break all existing uses of the library that pass a body argument to methods.

The problem with the body name collision is a design problem with agithub and we likely need to fix at a fundamental level.

I can imagine doing this either with a backwards incompatible design change that leaves support for legacy deployments or a configuration to enable a user to set the name of the body variable in their code to avoid collisions.

@gene1wood gene1wood closed this Oct 7, 2019
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