Skip to content

Commit

Permalink
Support PUT requests
Browse files Browse the repository at this point in the history
  • Loading branch information
null2205 committed Jun 29, 2018
1 parent 56f503a commit 21c8114
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chirpy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ def __call__(self, **kwargs):
elif method == 'POST':
post_data = json.dumps(json_body) if json_body is not None else kwargs
request = partial(requests.request, data=post_data)
elif method == 'PUT':
put_data = json.dumps(json_body) if json_body is not None else kwargs
request = partial(requests.request, params=kwargs, data=put_data)

resp = request(method, uriBase, headers=headers, timeout=_timeout,
proxies=self.proxies, auth=self.auth)
Expand Down

0 comments on commit 21c8114

Please sign in to comment.