| 46 | disconnect_seen = anyio.Event() |
| 47 | |
| 48 | async def waiting_app(scope: Scope, receive: Receive, send: Send) -> None: |
| 49 | assert scope["type"] == "http" |
| 50 | assert (await receive())["type"] == "http.request" |
| 51 | await send({"type": "http.response.start", "status": 200, "headers": []}) |
| 52 | seen_after_request.append(await receive()) |
| 53 | disconnect_seen.set() |
| 54 | |
| 55 | async with httpx.AsyncClient(transport=StreamingASGITransport(waiting_app), base_url="http://bridge") as http: |
| 56 | async with http.stream("GET", "/wait") as response: |