Skip to content

Commit 878bb61

Browse files
author
Kenneth Reitz
committed
readme update
1 parent 8493d83 commit 878bb61

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

README.rst

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Things shouldn't be this way. Not in Python.
1919
204
2020
>>> r.headers['content-type']
2121
'application/json'
22-
>>> r.content
22+
>>> r.text
2323
...
2424

2525
See `the same code, without Requests <https://gist.github.com/973705>`_.
@@ -47,36 +47,6 @@ Features
4747
- Full support for unicode URLs and domain names.
4848

4949

50-
Usage
51-
-----
52-
53-
It couldn't be simpler::
54-
55-
>>> import requests
56-
>>> r = requests.get('http://google.com')
57-
58-
59-
HTTPS? Basic Authentication? ::
60-
61-
>>> r = requests.get('https://httpbin.ep.io/basic-auth/user/pass')
62-
>>> r.status_code
63-
401
64-
65-
66-
Uh oh, we're not authorized! Let's add authentication. ::
67-
68-
>>> r = requests.get('https://httpbin.ep.io/basic-auth/user/pass', auth=('user', 'pass'))
69-
70-
>>> r.status_code
71-
200
72-
73-
>>> r.headers['content-type']
74-
'application/json'
75-
76-
>>> r.content
77-
'{"authenticated": true, "user": "user"}'
78-
79-
8050
Installation
8151
------------
8252

0 commit comments

Comments
 (0)