You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 🙂
The text was updated successfully, but these errors were encountered:
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
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 🙂The text was updated successfully, but these errors were encountered: