Warning: This is a work in progress. It's not ready for general use yet.
conn = httpnext.HTTPConnection("www.python.org")
conn.request("GET", "/index.html")
r1 = conn.getresponse()
print(r1.status, r1.reason)
while not r1.closed:
print(r1.read(200))
-
RFC7230 - HTTP/1.1: Message Syntax and Routing - low-level message parsing and connection management
-
RFC7231 - HTTP/1.1: Semantics and Content - methods, status codes and headers
-
RFC7232 - HTTP/1.1: Conditional Requests - e.g., If-Modified-Since
-
RFC7233 - HTTP/1.1: Range Requests - getting partial content
-
RFC7234 - HTTP/1.1: Caching - browser and intermediary caches
-
RFC7235 - HTTP/1.1: Authentication - a framework for HTTP authentication
-
https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/client.py
-
https://github.com/python/cpython/blob/master/Lib/http/client.py
-
https://github.com/joyent/node/blob/master/lib/_http_client.js
-
https://github.com/lukasa/hyper - SPDY, HTTP2
Features
- Early error support (HTTP/1.1 8.2.3
Expect: 100-continue
) - Mid-stream error support
- Chunked i/o, event support
- Zero-length chunk keepalive
- asyncio.IncompleReadError.expected is the total expected size, not the remaining size
- HTTP parsing without establishing a connection
- Incremental HTTP parsing
- Raw socket control
- backpressure tests
- Perf regression tests
- Defined extensibility strategy, mixins/plugins
- pyOpenSSL integration