sanic
sanic copied to clipboard
All view methods is marked as stream
Describe the bug If any View http-method is marked as stream all other method will me mark also.
Code snippet
class MyView(BaseView):
@stream
async def post():
return await make_stream()
async def get():
return HTTPResponse()
Expected behavior Get method must a common sanic method with standard preparation (call await self.request.receive_body())
Environment (please complete the following information):
- Version [v22.3.2] Additional context Problem here maybe
So, I think the problem is that this counts as a single route definition, and the stream is applied at the definition and not handler. It might be a difficult fix. Needs more investigation.