index.md
This file
Path
docs/index.md
116 lines · 3.3 KiB · Markdown
Last changed by
Fix typos, spelling issues, and grammar in docs (#426)Kyle Galbraithbefore adoptionb65bce5
History of this fileTake it
Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 1why, one step back1<p align="center" style="margin: 0 0 10px">Branding updates for httpx (#130)Tom Christiebefore adoption17bb165
line 2why, one step back2 <img width="350" height="208" src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/logo.jpg" alt='HTTPX'>Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 3why, one step back3</p>http3 (#86)Tom Christiebefore adoptionc9747aa
line 4why, one step back4Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 5–12why, one step back5<h1 align="center" style="font-size: 3rem; margin: -15px 0">6HTTPX7</h1>89---1011<div align="center">12<p>Branding updates for httpx (#130)Tom Christiebefore adoption17bb165
lines 13–14why, one step back13<a href="https://travis-ci.org/encode/httpx">14 <img src="https://travis-ci.org/encode/httpx.svg?branch=master" alt="Build Status">http3 (#86)Tom Christiebefore adoptionc9747aa
line 15why, one step back15</a>Branding updates for httpx (#130)Tom Christiebefore adoption17bb165
lines 16–17why, one step back16<a href="https://codecov.io/gh/encode/httpx">17 <img src="https://codecov.io/gh/encode/httpx/branch/master/graph/badge.svg" alt="Coverage">http3 (#86)Tom Christiebefore adoptionc9747aa
line 18why, one step back18</a>Branding updates for httpx (#130)Tom Christiebefore adoption17bb165
lines 19–20why, one step back19<a href="https://pypi.org/project/httpx/">20 <img src="https://badge.fury.io/py/httpx.svg" alt="Package version">http3 (#86)Tom Christiebefore adoptionc9747aa
line 21why, one step back21</a>Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 22why, one step back22</p>http3 (#86)Tom Christiebefore adoptionc9747aa
line 23why, one step back23Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 24–25why, one step back24<em>A next-generation HTTP client for Python.</em>25</div>http3 (#86)Tom Christiebefore adoptionc9747aa
lines 26–35why, one step back2627!!! warning28 This project should be considered as an "alpha" release. It is substantially29 API complete, but there are still some areas that need more work.3031---3233Let's get started...3435```pythonRenaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 36–37why, one step back36>>> import httpx37>>> r = httpx.get('https://www.example.org/')Int status codes (#92)Tom Christiebefore adoption56a7943
lines 38–39why, one step back38>>> r39<Response [200 OK]>http3 (#86)Tom Christiebefore adoptionc9747aa
line 40why, one step back40>>> r.status_codeInt status codes (#92)Tom Christiebefore adoption56a7943
line 41why, one step back41200Response.protocol -> Response.http_version (#250)Tom Christiebefore adoptionc1ec1c3
line 42why, one step back42>>> r.http_versionForce HTTP/1.1 on short-lived connections (#284)Seth Michael Larsonbefore adoptione7aa6d6
line 43why, one step back43'HTTP/1.1'http3 (#86)Tom Christiebefore adoptionc9747aa
lines 44–51why, one step back44>>> r.headers['content-type']45'text/html; charset=UTF-8'46>>> r.text47'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'48```4950## Features51Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 52why, one step back52HTTPX builds on the well-established usability of `requests`, and gives you:http3 (#86)Tom Christiebefore adoptionc9747aa
lines 53–55why, one step back5354* A requests-compatible API.55* HTTP/2 and HTTP/1.1 support.Support WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
lines 56–58why, one step back56* Support for [issuing HTTP requests in parallel](parallel.md). *(Coming soon)*57* Standard synchronous interface, but [with `async`/`await` support if you need it](async.md).58* Ability to [make requests directly to WSGI or ASGI applications](advanced.md#calling-into-python-web-apps).http3 (#86)Tom Christiebefore adoptionc9747aa
lines 59–68why, one step back59* Strict timeouts everywhere.60* Fully type annotated.61* 100% test coverage.6263Plus all the standard features of `requests`...6465* International Domains and URLs66* Keep-Alive & Connection Pooling67* Sessions with Cookie Persistence68* Browser-style SSL VerificationSupport WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
line 69why, one step back69* Basic/Digest Authentication *(Digest is still TODO)*http3 (#86)Tom Christiebefore adoptionc9747aa
lines 70–73why, one step back70* Elegant Key/Value Cookies71* Automatic Decompression72* Automatic Content Decoding73* Unicode Response BodiesAdd multipart docsTom Christiebefore adoptiond21e3ab
line 74why, one step back74* Multipart File UploadsSupport WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
line 75why, one step back75* HTTP(S) Proxy Support *(TODO)*http3 (#86)Tom Christiebefore adoptionc9747aa
lines 76–77why, one step back76* Connection Timeouts77* Streaming DownloadsDocumented netrc support (#225)Can Sarıgölbefore adoption21939fd
line 78why, one step back78* .netrc Supporthttp3 (#86)Tom Christiebefore adoptionc9747aa
lines 79–84why, one step back79* Chunked Requests8081## Documentation8283For a run-through of all the basics, head over to the [QuickStart](quickstart.md).84Support WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
lines 85–87why, one step back85For more advanced topics, see the [Advanced Usage](advanced.md) section, or86the specific topics on making [Parallel Requests](parallel.md) or using the87[Async Client](async.md).http3 (#86)Tom Christiebefore adoptionc9747aa
lines 88–92why, one step back8889The [Developer Interface](api.md) provides a comprehensive API reference.9091## Dependencies92Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 93why, one step back93The HTTPX project relies on these excellent libraries:http3 (#86)Tom Christiebefore adoptionc9747aa
lines 94–98why, one step back9495* `h2` - HTTP/2 support.96* `h11` - HTTP/1.1 support.97* `certifi` - SSL certificates.98* `chardet` - Fallback auto-detection for response encoding.Merge pull request #315 from cansarigol/hstspreload-docTom Christiebefore adoption67d96b6
line 99why, one step back99* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.http3 (#86)Tom Christiebefore adoptionc9747aa
lines 100–105why, one step back100* `idna` - Internationalized domain name support.101* `rfc3986` - URL parsing & normalization.102* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*103104A huge amount of credit is due to `requests` for the API layout that105much of this work follows, as well as to `urllib3` for plenty of designFix typos, spelling issues, and grammar in docs (#426)Kyle Galbraithbefore adoptionb65bce5
line 106why, one step back106inspiration around the lower-level networking details.Docs tweaksTom Christiebefore adoption60dca3d
lines 107–112why, one step back107108## Installation109110Install with pip:111112```shellRenaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 113why, one step back113$ pip install httpxDocs tweaksTom Christiebefore adoption60dca3d
lines 114–115why, one step back114```115Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 116why, one step back116HTTPX requires Python 3.6+