This way this package can be tested with and old unittest package and old Python version.
…struble Conflicts: tests/tests.py
…g header_auth We send data encoded in the url. This makes Twitter test `test_update_profile_image` pass, fixing issue #GH-17
url used in requests is calculated different, if we reset _enc_params as we had to do before, we can lose GET parameters. Also if we are doing a POST request, if information gets encoded in the url, we clean data, for avoiding sending duplicate information, which makes many OAuth providers fail.
This is probably the final patch for issues #GH-10 and #GH-12 The body of the request isn't included in the signature base string if the request's 'Content-Type' header isn't "application/x-www-form-urlencoded". Also, requests-oauth overwrites request.data, relying on requests reenconding correctly if `request.data` or `request.files` was modified in the hook. This way we avoid duplicating code from requests and hooks can alter body to be sent. This way we can also pull some parameters out of the data, such as oauth_callback. This way we get #GH-13 working.
This works on a better patch for #GH-12. It follows the spec definition and also includes the signature when posting when header_auth is not used.