Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 2446bb6

Browse files
committed
Update docs to mention HTTPHeaderMap.
1 parent c0b0d26 commit 2446bb6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

docs/source/advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ the original response, or when also processing the original response in a
143143
separate thread (N.B. do not do this; ``hyper`` is not yet thread-safe)::
144144

145145
conn.request('GET', '/')
146-
response = conn.getheaders()
146+
response = conn.getresponse()
147147
for push in conn.getpushes(): # all pushes promised before response headers
148148
print(push.path)
149149
conn.read()

docs/source/quickstart.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,12 @@ HTTP/2 *stream identifier*. If you're planning to use ``hyper`` in this very
7272
simple way, you can choose to ignore it, but it's potentially useful. We'll
7373
come back to it.
7474

75-
Once you've got the data, things continue to behave exactly like
76-
``http.client``::
75+
Once you've got the data, things diverge a little bit::
7776

7877
>>> resp.getheader('content-encoding')
7978
'deflate'
80-
>>> resp.getheaders()
81-
[('x-xss-protection', '1; mode=block')...
79+
>>> resp.headers
80+
HTTPHeaderMap([(b'x-xss-protection', b'1; mode=block')...
8281
>>> resp.status
8382
200
8483

0 commit comments

Comments
 (0)