Skip to content

Commit

Permalink
Merge pull request #4 from null2205/bots-1064
Browse files Browse the repository at this point in the history
Support PUT requests
  • Loading branch information
null2205 authored Jul 3, 2018
2 parents 56f503a + 21c8114 commit be07dca
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 be07dca

Please sign in to comment.