HTTP web services are not limited to GET requests. What if you want to create something new? Whenever you post a comment on a discussion forum, update your weblog, publish your status on a microblogging service like Twitter or, you’re probably already using http POST.

Both Twitter and both offer a simple HTTP-based API for publishing and updating your status in 140 characters or less. Let’s look at’s API documentation for updating your status: rest api Method: statuses/update
Updates the authenticating user’s status. Requires the status parameter specified below. Request must be a POST.

	xml, json, rss, atom
HTTP Method(s)
Requires Authentication
	status. Required. The text of your status update. URL-encode as necessary.

How does this work? To publish a new message on, you need to issue an HTTP POST request to (The format bit is not part of the URL; you replace it with the data format you want the server to return in response to your request. So if you want a response in XML, you would post the request to The request needs to include a parameter called status, which contains the text of your status update. And the request needs to be authenticated.

Authenticated? Sure. To update your status on, you need to prove who you are. is not a wiki; only you can update your own status. uses HTTP Basic Authentication (a.k.a. RFC 2617) over ssl to provide secure but easy-to-use authentication. httplib2 supports both SSL and HTTP Basic Authentication, so this part is easy.

A POST request is different from a GET request, because it includes a payload. The payload is the data you want to send to the server. The one piece of data that this api method requires is status, and it should be URL-encoded. This is a very simple serialization format that takes a set of key-value pairs (i.e. a dictionary) and transforms it into a string.

Get hands-on with 1200+ tech skills courses.