Permalink
Browse files

Support empty PUT by expliciting setting a Content-Length:0 if there …

…is no data.
  • Loading branch information...
1 parent 52fa552 commit 427f77df54b843dcb561dbe5d8c1f801cae879c8 @stevenwei committed Apr 23, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 chargify.py
View
@@ -53,6 +53,8 @@ def make_request(self, url, method, data, api_key):
request.add_header('User-Agent', 'Chargify Python Client')
request.add_header('Accept', 'application/json')
request.add_header('Content-Type', 'application/json')
+ if data is None:
+ request.add_header('Content-Length','0')
# Make request and trap for HTTP errors
try:

0 comments on commit 427f77d

Please sign in to comment.