Version 0.1.5

This commit is contained in:
Tom Christie 2018-06-27 21:46:09 +01:00
parent 77bc250ec6
commit 1c7eb8b409
2 changed files with 7 additions and 3 deletions

View File

@ -219,7 +219,7 @@ class App:
body = b''
async for chunk in request.stream():
body += chunk
response = Response(content, media_type='text/plain')
response = Response(body, media_type='text/plain')
await response(receive, send)
```
@ -299,10 +299,14 @@ def test_app():
## Decorators
The `asgi_application` decorator turns an `async` function into an ASGI application.
The `asgi_application` decorator takes a request/response function and turns
it into an ASGI application.
The function must take a single `request` argument, and return a response.
The decorator can be applied to either `async` functions, or to standard
functions.
```python
from starlette import asgi_application, HTMLResponse

View File

@ -17,4 +17,4 @@ __all__ = (
"Request",
"TestClient",
)
__version__ = "0.1.4"
__version__ = "0.1.5"