From c840bc7d0962d253afd4c8a72c242cbf2b882dc0 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 13 Feb 2011 15:49:34 -0500 Subject: [PATCH] readme update --- README.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 5f04593..da04af8 100644 --- a/README.rst +++ b/README.rst @@ -23,22 +23,30 @@ But this one's different. This one's going to be awesome. And simple. Really simple. + Usage ----- Let's do this. :: - >>> import requests + >>> request.get(url, params={}, headers={} auth=None) + + >>> request.put(url, params={}, headers={}, auth=None) + + >>> request.post(url, params={}, headers={}, auth=None) + + >>> request.delete(url, params={}, headers={}, auth=None) + >>> r = request.Request() - >>> r.url = 'httep://someurl.com/' + >>> r.url = 'http://someurl.com/' >>> r.add_header(('key', 'value')) >>> r.method = 'GET' @@ -66,7 +74,7 @@ Let's do this. :: Access stuff. :: >>> r = request.get('https://github.com') - >>> r.status_code() + >>> r.response.status_code() HTTP Authentication. :: -- 2.7.4