      # First encode tha data we want to POST, we'll use urllib for encoding
      # and the time module to send the current time as as a string value for our POST
      >>> import urllib, time
      >>> d = urllib.urlencode((('bar', 123), ('baz', time.asctime())))
      # Now use the Request class and specify the 'Content-type'
      >>> req = urllib2.Request('http://rest.ep.io/model-resource-example/', data=d, headers={'Content-Type':'application/x-www-form-urlencoded'})
      >>> resp = urllib2.urlopen(req)
      >>> resp.getcode()
      201
      >>> resp.read()
 
</s> remove     # First encode tha data we want to POST, we'll use urllib for encoding
    # and the time module to send the current time as as a string value for our POST
 </s> add  </s> remove     # Or examin the response itself:
    >>> print r.read()
 </s> add     >>> print r.read() # Examin the response itself </s> remove And here's an example which does a 'POST' to create a new instance::
 </s> add Using the 'POST' method
-----------------------

And here's an example which does a 'POST' to create a new instance. First let's encode 
the data we want to POST. We'll use `urllib` for encoding and the `time` module 
to send the current time as as a string value for our POST.:: </s> remove     # You can check if the response was ok:
    >>> r.getcode()
 </s> add     >>> r.getcode() # Check if the response was ok
   
Now use the `Request` class and specify the 'Content-type'::

      # First encode tha data we want to POST, we'll use urllib for encoding
      # and the time module to send the current time as as a string value for our POST
      >>> import urllib, time
      >>> d = urllib.urlencode((('bar', 123), ('baz', time.asctime())))
   
Now use the `Request` class and specify the 'Content-type'::

      >>> req = urllib2.Request('http://rest.ep.io/model-resource-example/', data=d, headers={'Content-Type':'application/x-www-form-urlencoded'})
      >>> resp = urllib2.urlopen(req)
      >>> resp.getcode()
      201
      >>> resp.read()
keep keep keep keep replace keep keep keep keep keep
 Colouring of literal code

Get the nice colouring sphinx provides and fix some more typos. 
docs/howto/usingurllib2.rst