-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Describe the bug
The decorator that specifies HTTP method and URI must be the "closest" to a Consumer method in order to the rest of decorators have any effect.
To Reproduce
class ApiConsumer(Consumer):
# Content-Type header WILL be set
@headers({"Content-Type": "text/plain"})
@post("foo")
def foo(self, file: Body):
...
# Content-Type header WILL NOT be set
@post("bar")
@headers({"Content-Type": "text/plain"})
def bar(self, file: Body):
...
Expected behavior
Order of decorators doesn't matter OR documentation explicitly states that @http_method decorator must be the "last" one.
Additional context
All code examples actually have @http_method decorator applied last, but I couldn't find mentions of importance of that 🙂
glebignatieff, chevignon93 and fdemmer
Metadata
Metadata
Assignees
Labels
No labels