summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Gregorio <joe@bitworking.org>2015-07-03 10:30:06 -0400
committerJoe Gregorio <joe@bitworking.org>2015-07-03 10:30:06 -0400
commitf69fe23a71ac58bde912af87dabf3057c4cd3c76 (patch)
tree400c754cd465e84640ccfabf45779f352feb7908
parentf9f797223d075874b0031aea832152688ec23fef (diff)
parent8eac7f9e45fd05e81f8398de9a80d7b3e04a7d77 (diff)
downloadhttplib2-f69fe23a71ac58bde912af87dabf3057c4cd3c76.tar.gz
Merge pull request #304 from davidsansome/readme-indentation
Minor fixes to indentation in the README
-rw-r--r--README.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/README.md b/README.md
index 4731833..e164b7c 100644
--- a/README.md
+++ b/README.md
@@ -58,9 +58,9 @@ Usage
A simple retrieval:
```python
- import httplib2
- h = httplib2.Http(".cache")
- (resp_headers, content) = h.request("http://example.org/", "GET")
+import httplib2
+h = httplib2.Http(".cache")
+(resp_headers, content) = h.request("http://example.org/", "GET")
```
The 'content' is the content retrieved from the URL. The content
@@ -69,22 +69,22 @@ is already decompressed or unzipped if necessary.
To PUT some content to a server that uses SSL and Basic authentication:
```python
- import httplib2
- h = httplib2.Http(".cache")
- h.add_credentials('name', 'password')
- (resp, content) = h.request("https://example.org/chapter/2",
+import httplib2
+h = httplib2.Http(".cache")
+h.add_credentials('name', 'password')
+(resp, content) = h.request("https://example.org/chapter/2",
"PUT", body="This is text",
headers={'content-type':'text/plain'} )
-```
+```
Use the Cache-Control: header to control how the caching operates.
```python
- import httplib2
- h = httplib2.Http(".cache")
- (resp, content) = h.request("http://bitworking.org/", "GET")
- ...
- (resp, content) = h.request("http://bitworking.org/", "GET",
+import httplib2
+h = httplib2.Http(".cache")
+(resp, content) = h.request("http://bitworking.org/", "GET")
+...
+(resp, content) = h.request("http://bitworking.org/", "GET",
headers={'cache-control':'no-cache'})
```