]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Version 0.1.5 14/head
authorTom Christie <tom@tomchristie.com>
Wed, 27 Jun 2018 20:46:09 +0000 (21:46 +0100)
committerTom Christie <tom@tomchristie.com>
Wed, 27 Jun 2018 20:46:09 +0000 (21:46 +0100)
README.md
starlette/__init__.py

index 4020e5c8464446e199aed12d24b655033b49deff..842915b0841fb20f56cd3f273c366937e835539b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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
 
index b29538660863cbbaf6309a19496fef13c52fc232..248468f6aefc167d2471df4974f9d702b4f56c0f 100644 (file)
@@ -17,4 +17,4 @@ __all__ = (
     "Request",
     "TestClient",
 )
-__version__ = "0.1.4"
+__version__ = "0.1.5"