From: Tom Christie Date: Mon, 8 Apr 2019 09:13:48 +0000 (+0100) Subject: Update README.md X-Git-Tag: 0.1.0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=337eb70eb0b6a2be7a4720dcf341c6a86378d985;p=thirdparty%2Fhttpx.git Update README.md --- diff --git a/README.md b/README.md index 4aa8778a..6519421c 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ The intent is that this library could be the low-level implementation, that `req ## Usage +Making a request: + ```python import httpcore @@ -34,21 +36,21 @@ assert response.status_code == 200 assert response.body == b'Hello, world' ``` -Top-level API... +Top-level API: ```python http = httpcore.ConnectionPool([ssl], [timeout], [limits]) response = await http.request(method, url, [headers], [body], [stream]) ``` -ConnectionPool as a context-manager... +ConnectionPool as a context-manager: ```python async with httpcore.ConnectionPool([ssl], [timeout], [limits]) as http: response = await http.request(method, url, [headers], [body], [stream]) ``` -Streaming... +Streaming responses: ```python http = httpcore.ConnectionPool()