diff options
author | 2011-11-16 01:52:33 +0100 | |
---|---|---|
committer | 2011-11-16 01:52:33 +0100 | |
commit | 84a085138f69401bb5787916a530b59935c8dc19 (patch) | |
tree | 2cd1a72aa13c68af94ca118922117934a942308b /github3/api.py | |
parent | API change: Added gravatar_id in User model (diff) | |
download | python-github3-84a085138f69401bb5787916a530b59935c8dc19.tar.xz python-github3-84a085138f69401bb5787916a530b59935c8dc19.zip |
Fix 411 with PUT request
with data as None, requests module didn't add specific header
Diffstat (limited to 'github3/api.py')
-rw-r--r-- | github3/api.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/github3/api.py b/github3/api.py index 1c467ff..a4ee4a9 100644 --- a/github3/api.py +++ b/github3/api.py @@ -72,8 +72,9 @@ class GithubCore(object): def put(self, request, **kwargs): """ PUT request """ - # Content-length: 0 to headers ? - response = self._request('PUT', request, **kwargs) + + response = self._request('PUT', request, + headers={'Content-length': '0'}, **kwargs) assert response.status_code == 204 return response |