diff --git a/http-web-services.html b/http-web-services.html index b4802ef..e641885 100644 --- a/http-web-services.html +++ b/http-web-services.html @@ -548,18 +548,18 @@ reply: 'HTTP/1.1 301 Moved Permanently'

FIXME

->>> import httplib2
->>> from urllib.parse import urlencode
->>> h = httplib2.Http('.cache')
->>> data = {"status": "Test update from Python 3"}
->>> h.add_credentials("diveintomark", "MY_SECRET_PASSWORD")
->>> resp, content = h.request("http://twitter.com/statuses/update.xml", "POST", urlencode(data))
->>> resp.status
-200
->>> from xml.etree import ElementTree as etree
->>> tree = etree.fromstring(content)
->>> print(etree.tostring(tree))
-<status>
+>>> import httplib2
+>>> from urllib.parse import urlencode
+>>> h = httplib2.Http('.cache')
+>>> data = {"status": "Test update from Python 3"}
+>>> h.add_credentials("diveintomark", "MY_SECRET_PASSWORD")
+>>> resp, content = h.request("http://twitter.com/statuses/update.xml", "POST", urlencode(data))
+>>> resp.status
+200
+>>> from xml.etree import ElementTree as etree
+>>> tree = etree.fromstring(content)
+>>> print(etree.tostring(tree))
+<status>
   <created_at>Sat May 30 19:11:38 +0000 2009</created_at>
   <id>1973974228</id>
   <text>Test update from Python 3</text>
@@ -596,8 +596,7 @@ reply: 'HTTP/1.1 301 Moved Permanently'
     <notifications>false</notifications>
     <following>false</following>
   </user>
-</status>
-
+</status>

FIXME