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

Commit 23e944f

Browse files
committed
Merge pull request #128 from jdecuyper/update-docs
Update stream example in documentation
2 parents 7e281c9 + a5df042 commit 23e944f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/source/quickstart.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ For example::
100100

101101
>>> from hyper import HTTPConnection
102102
>>> c = HTTPConnection('http2bin.org')
103-
>>> first = c.request('GET', '/get')
104-
>>> second = c.request('POST', '/post', body='key=value')
103+
>>> first = c.request('GET', '/get', body='hello')
104+
>>> second = c.request('POST', '/post', headers={'key':'value'})
105105
>>> third = c.request('GET', '/ip')
106-
>>> second_response = c.getresponse(second)
107-
>>> first_response = c.getresponse(first)
108-
>>> third_response = c.getresponse(third)
106+
>>> second_response = c.get_response(second)
107+
>>> first_response = c.get_response(first)
108+
>>> third_response = c.get_response(third)
109109

110110
``hyper`` will ensure that each response is matched to the correct request.
111111

0 commit comments

Comments
 (0)