raw requires a bytes-like object
raw requires a bytes-like object, or an object that implements __bytes__, not 'str'
This commit is contained in:
parent
ad8a168469
commit
e735fe54c3
|
@ -91,7 +91,7 @@ from sanic import response
|
|||
|
||||
@app.route('/raw')
|
||||
def handle_request(request):
|
||||
return response.raw('raw data')
|
||||
return response.raw(b'raw data')
|
||||
```
|
||||
|
||||
## Modify headers or status
|
||||
|
|
Loading…
Reference in New Issue
Block a user