Update README
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Tom Christie · committed by Tom Christie · parent 6b60d95 · Browse files · 1 file·+25 added−16 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+25 added−16 removed
- other:+25 added−16 removed
Provenance
- Commit
fa8d296- Tree
285f508- Author
Tom Christie <tom@tomchristie.com>- Committer
Tom Christie <tom@tomchristie.com>- Parent
6b60d95
1 file changed+25 added−16 removed
modified:README.md+25 added-16 removed
11 unmodified lines12131415161617181819202122232324252627272829303132333435363736383940414 unmodified lines46474849495051525330 unmodified lines84858687888990919288899091979892939495969798991001011021031041021051061071081091101111129 unmodified lines12212312412512012112612712812913013113213313413549 unmodified lines11 unmodified linesPlus all the standard features of requests...
* International Domains and URLs* Keep-Alive & Connection Pooling* Sessions with Cookie Persistence *TODO** Sessions with Cookie Persistence *TODO - Requires `adapters/cookies.py` implementation.** Browser-style SSL Verification* Basic/Digest Authentication *TODO** Basic/Digest Authentication *TODO - Requires `adapters/authentication.py` implementation.** Elegant Key/Value Cookies *TODO** Automatic Decompression* Automatic Content Decoding* Unicode Response Bodies* Multipart File Uploads *TODO** Multipart File Uploads *TODO - Request content currently supports bytes or async byte iterators.** HTTP(S) Proxy Support *TODO** Connection Timeouts* Streaming Downloads* .netrc Support *TODO** .netrc Support *TODO - Requires `adapters/environment.py` implementation.** Chunked Requests
## Usage
**Note**: Use `ipython` to try this from the console, since it supports `await`.
Making a request:
```python>>> import httpcore>>>>>> client = httpcore.Client()>>> response = await client.get('http://example.com')>>> response.status_code<StatusCode.ok: 200>4 unmodified linesAlternatively, thread-synchronous requests:
```python>>> import httpcore>>>>>> client = httpcore.SyncClient()>>> response = client.get('http://example.com')>>> response.status_code<StatusCode.ok: 200>30 unmodified lines* `.headers` - **Headers*** `.content` - **bytes*** `.text` - **str*** `.encoding` - **str*** `.json()` - **Any** *TODO** `.read()` - **bytes*** `.stream()` - **bytes iterator*** `.raw()` - **bytes iterator*** `.close()` - **None*** `.is_redirect` - **bool*** `.request` - **Request*** `.cookies` - **Cookies** *TODO** `.history` - **List[Response]*** `.raise_for_status()` - **Response** *TODO** `.next()` - **Response**
Methods:
* `def .raise_for_status()` - **Response** *TODO** `def .json()` - **Any** *TODO** `async def .read()` - **bytes*** `async def .stream()` - **bytes iterator*** `async def .raw()` - **bytes iterator*** `async def .close()` - **None*** `async def .next()` - **Response**
#### `Request(method, url, content, headers)`
...* `.method` - **str** (Uppercased)* `.url` - **URL*** `.content` - **byte** or **byte async iterator*** `.headers` - **Headers**
#### `URL(url, allow_relative=False)`
*A normalized, IDNA supporting URL.*9 unmodified lines* `.is_ssl` - **bool*** `.origin` - **Origin*** `.is_absolute_url` - **bool*** `.is_relative_url` - **bool*** `.copy_with([scheme], [authority], [path], [query], [fragment])` - **URL*** `.resolve_with(url)` - **URL**
Methods:
* `def .copy_with([scheme], [authority], [path], [query], [fragment])` - **URL*** `def .resolve_with(url)` - **URL**
#### `Origin(url)`
*A normalized, IDNA supporting set of scheme/host/port info.*
49 unmodified lines