From: Jaakko Lappalainen Date: Mon, 5 Apr 2021 08:55:57 +0000 (+0100) Subject: added docs for startup/shutdown of ASGI apps (#1554) X-Git-Tag: 0.18.0~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1ccdbcb81a1463e5fa81010c9fdfe35264e3e9f;p=thirdparty%2Fhttpx.git added docs for startup/shutdown of ASGI apps (#1554) --- diff --git a/docs/async.md b/docs/async.md index 8ddee956..360be8fe 100644 --- a/docs/async.md +++ b/docs/async.md @@ -237,3 +237,9 @@ async with httpx.AsyncClient(transport=transport, base_url="http://testserver") ``` See [the ASGI documentation](https://asgi.readthedocs.io/en/latest/specs/www.html#connection-scope) for more details on the `client` and `root_path` keys. + +## Startup/shutdown of ASGI apps + +It is not in the scope of HTTPX to trigger lifespan events of your app. + +However it is suggested to use `LifespanManager` from [asgi-lifespan](https://github.com/florimondmanca/asgi-lifespan#usage) in pair with `AsyncClient`.