Skip to content
Myr

Apply black formatting (Tho it looks like a broken case to me?)

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 0276ff9 · Browse files · 2 files+18 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+18 added−1 removed

  • other:+18 added−1 removed

2 files+18 added−1 removed

modified:httpx/middleware.py+1 added-1 removed
149 unmodified lines
150 del headers["Authorization"]151 del headers["Host"]152153 if method != request.method and method == "GET":154 # Strip Content-Length headers when we've switch to a 'GET' request.154 #  Strip Content-Length headers when we've switch to a 'GET' request.155 del headers["Content-Length"]156157 return headers158
9 unmodified lines
added:example.py+17 added
1import httpx2import time3import requests45url = "https://httpbin.org/stream-bytes/50000000"67start = time.time()8r = requests.get(url)9print("requests %.1f s" % (time.time() - start))1011for http_version in ["HTTP/1.1", "HTTP/2"]:12 client = httpx.Client(http_versions=http_version)1314 start = time.time()15 r = client.get(url)16 print("httpx %s %.1f s" % (http_version, time.time() - start))17 print(r.http_version)