From: Tom Christie Date: Tue, 23 Apr 2019 10:57:12 +0000 (+0100) Subject: Update README for 0.2.0 X-Git-Tag: 0.2.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb3d45281656939ee3ebb660262a4396348a3131;p=thirdparty%2Fhttpx.git Update README for 0.2.0 --- diff --git a/README.md b/README.md index c9272693..a22e2417 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ A low-level async HTTP library. * SSL verification. (Done) * Proxy support. (Not done) * HTTP/2 support. (Not done) -* Support *both* async and sync operations. (Sync will be lightweight shim on top of async. Not done.) +* Support *both* async and sync operations. (Done.) ## Motivation @@ -69,6 +69,15 @@ async for part in response.raw(): ... ``` +Thread-synchronous requests: + +```python +http = httpcore.SyncConnectionPool() +response = http.request('GET', 'http://example.com') +assert response.status_code == 200 +assert response.body == b'Hello, world' +``` + ## Building a Gateway Server The level of abstraction fits in really well if you're just writing at