Skip to content

Commit

Permalink
Merge pull request #42 from yinwm/master
Browse files Browse the repository at this point in the history
Force encoding to utf-8 for requests when using WeChatOAuth
  • Loading branch information
messense committed May 3, 2015
2 parents 3393c92 + 6f04f84 commit cb451ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wechatpy/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def _request(self, method, url_or_endpoint, **kwargs):
**kwargs
)
res.raise_for_status()
res.encoding = 'UTF-8'
result = res.json()

if 'errcode' in result and result['errcode'] != 0:
Expand Down

0 comments on commit cb451ea

Please sign in to comment.