]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Update README
authorTom Christie <tom@tomchristie.com>
Wed, 1 May 2019 14:39:53 +0000 (15:39 +0100)
committerTom Christie <tom@tomchristie.com>
Wed, 1 May 2019 14:39:53 +0000 (15:39 +0100)
README.md

index 649affdb5c1ac83a1262b12fa16f6a56075fc339..d55796e7f5242138f175d12d7e0bef8f8e06953a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -79,6 +79,13 @@ Additionally, credit is due to for `urllib3` for plenty of design inspiration.
 
 #### `Client([ssl], [timeout], [pool_limits], [max_redirects])`
 
+*An HTTP client, with connection pooling, redirects, cookie persistence, etc.*
+
+```python
+>>> client = Client()
+>>> response = await client.get('https://example.org')
+```
+
 * `async def .request(method, url, [content], [headers], [stream], [allow_redirects], [ssl], [timeout])`
 * `async def .get(url, [headers], [stream], [allow_redirects], [ssl], [timeout])`
 * `async def .options(url, [headers], [stream], [allow_redirects], [ssl], [timeout])`
@@ -93,6 +100,8 @@ Additionally, credit is due to for `urllib3` for plenty of design inspiration.
 
 ### Models
 
+*Data-structures for HTTP primitives...*
+
 #### `Response(...)`
 
 *An HTTP response.*
@@ -123,7 +132,7 @@ Additionally, credit is due to for `urllib3` for plenty of design inspiration.
 what gets sent over the wire.*
 
 ```python
->>> request = Request("GET", "http://example.org", headers={'host': 'example.org'})
+>>> request = Request("GET", "https://example.org", headers={'host': 'example.org'})
 >>> response = await client.send(request)
 ```
 
@@ -136,6 +145,12 @@ what gets sent over the wire.*
 
 *A normalized, IDNA supporting URL.*
 
+```python
+>>> url = URL("https://example.org/")
+>>> url.host
+'example.org'
+```
+
 * `.scheme` - **str**
 * `.authority` - **str**
 * `.host` - **str**