aboutsummaryrefslogtreecommitdiffstats
path: root/github3/api.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2011-11-16 01:52:33 +0100
committerDavid Medina <davidmedina9@gmail.com>2011-11-16 01:52:33 +0100
commit84a085138f69401bb5787916a530b59935c8dc19 (patch)
tree2cd1a72aa13c68af94ca118922117934a942308b /github3/api.py
parentAPI change: Added gravatar_id in User model (diff)
downloadpython-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.py5
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