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

Add the ability to add body in PUT, PATCH and DELETE #60

Merged
merged 1 commit into from
Aug 3, 2021
Merged

Conversation

sansyrox
Copy link
Member

@sansyrox sansyrox commented Aug 2, 2021

This PR adds body param in PUT, PATCH and DELETE HTTP methods.

@@ -129,6 +135,12 @@ def patch(self, endpoint):
:param endpoint [str]: [endpoint to server the route]
"""
def inner(handler):
sig = inspect.signature(handler)
params = len(sig.parameters)
if params != 1:
Copy link
Member Author

Choose a reason for hiding this comment

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

On further thought, this should not be a mandate.
One should be able to create a route without worrying about the params.

@sansyrox sansyrox changed the title Add the ability to add body in PUT and PATCH Add the ability to add body in PUT, PATCH and DELETE Aug 3, 2021
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.

1 participant