idangazit/oauthlib — pull request #12 by ib-lundgren (2012-03-16 22:40:49+00:00)
Title: Allow body=dict/list in sign_request

Very often you will have the POST data in either a dictionary or a list rather than a nicely encoded string. That is also the way I usually send data with requests.

With this change you will be able to do the following (confirmed against twitter)

twitter = OAuthClient(client_key=key,
resource_owner_key=access_token,
resource_owner_secret=token_secret,
client_secret=secret)
uri, body, headers = twitter.sign_request(update_url, http_method=u"POST", body=post)
r = requests.post(update_url, data=post, headers=headers)