diff --git a/README.md b/README.md index 3e467b3..62f1c81 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,19 @@ Adapted from Eric Larson's fantastic [CacheControl](https://github.com/ionrock/c **Usage:** ```python +import asyncio + from httpx import AsyncClient from httpx_caching import CachingClient client = AsyncClient() client = CachingClient(client) -async client.get("http://example.com") +async run_example(): + await client.get("http://example.com") + +loop = asyncio.get_event_loop() +loop.run_until_complete(run_example()) ```