michaelhelmick / python-tumblpy

A Python Library to interface with Tumblr v2 REST API & OAuth
BSD 2-Clause "Simplified" License
122 stars 36 forks source link

I realized that after the POST request was completed, self.headers was modified. #4

Closed joaquincasares closed 11 years ago

joaquincasares commented 12 years ago

This ensures the headers are never changed and thus allowing the following GET requests to complete successfully.

I was receiving TumblpyAuthErrors after running a t.post('user/info') followed by a t.get('followers', blog_url=blog['url']). Now it's all good.

This was what self.headers was returning after the original t.post() request: {'Content-Type': 'application/x-www-form-urlencoded', 'User-agent': 'Tumblpy 0.5.0'}.

Now it only returns: {'User-agent': 'Tumblpy 0.5.0'}

Thanks again for your great api code!

michaelhelmick commented 11 years ago

Hi @joaquincasares

Just so you know, I updated my library to use requests Please check and see if you are still receiving this error

joaquincasares commented 11 years ago

Okay. Thanks for the update. I'll upgrade and test the new version and update you here.

Thanks again!

joaquincasares commented 11 years ago

0.6.0 no longer has this issue.

Thanks!