diff options
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 54 |
1 files changed, 13 insertions, 41 deletions
@@ -1,6 +1,8 @@ Requests: HTTP for Humans ========================= +.. image:: https://secure.travis-ci.org/kennethreitz/requests.png?branch=develop + Requests is an ISC Licensed HTTP library, written in Python, for human beings. @@ -19,7 +21,7 @@ Things shouldn't be this way. Not in Python. 204 >>> r.headers['content-type'] 'application/json' - >>> r.content + >>> r.text ... See `the same code, without Requests <https://gist.github.com/973705>`_. @@ -35,46 +37,16 @@ hacks for you. Features -------- -- Browser standard SSL verification. -- Extremely simple HEAD, GET, POST, PUT, PATCH, DELETE Requests. -- Gevent support for Asyncronous Requests. -- Sessions with cookie persistence. -- Basic, Digest, and Custom Authentication support. -- Automatic form-encoding of dictionaries -- A simple dictionary interface for request/response cookies. -- Multipart file uploads. -- Automatc decoding of Unicode, gzip, and deflate responses. -- Full support for unicode URLs and domain names. - - -Usage ------ - -It couldn't be simpler:: - - >>> import requests - >>> r = requests.get('http://google.com') - - -HTTPS? Basic Authentication? :: - - >>> r = requests.get('https://httpbin.ep.io/basic-auth/user/pass') - >>> r.status_code - 401 - - -Uh oh, we're not authorized! Let's add authentication. :: - - >>> r = requests.get('https://httpbin.ep.io/basic-auth/user/pass', auth=('user', 'pass')) - - >>> r.status_code - 200 - - >>> r.headers['content-type'] - 'application/json' - - >>> r.content - '{"authenticated": true, "user": "user"}' +- International Domains and URLs +- Keep-Alive & Connection Pooling +- Sessions with Cookie Persistence +- Browser-style SSL Verification +- Basic/Digest Authentication +- Elegant Key/Value Cookies +- Automatic Decompression +- Unicode Response Bodies +- Multipart File Uploads +- Connection Timeouts Installation |