I'm having some trouble POSTing UTF-8 content to Bitbucket's REST API. I see there are no tests covering UTF-8 content, so would like to get this verified.
If I make a POST request with the vanilla Requests library using a hardcoded auth=('un','pw) in my session I can submit content containing UTF-8 characters. If I make the same POST request via an authenticated session using requests-oauth Bitbucket gives me a 500 response. POST requests via requests-oauth that do not include UTF-8 content work just fine.
I've verified the exact same content being sent works via curl and via a vanilla Requests library client.post(), so something seems funny with requests-oauth's handling of unicode content. Any thoughts?
I'm having some trouble POSTing UTF-8 content to Bitbucket's REST API. I see there are no tests covering UTF-8 content, so would like to get this verified.
If I make a POST request with the vanilla Requests library using a hardcoded auth=('un','pw) in my session I can submit content containing UTF-8 characters. If I make the same POST request via an authenticated session using requests-oauth Bitbucket gives me a 500 response. POST requests via requests-oauth that do not include UTF-8 content work just fine.
General approach is:
client = requests.session(hooks={ 'pre_request': OAuthHook(access_token = tok, access_token_secret = sec) }) client.post(url, data=request.form)
I've verified the exact same content being sent works via curl and via a vanilla Requests library client.post(), so something seems funny with requests-oauth's handling of unicode content. Any thoughts?