Skip to content

Commit

Permalink
fix bug: Body must be None for method GET
Browse files Browse the repository at this point in the history
  • Loading branch information
delong1 committed Jun 29, 2016
1 parent 0be6759 commit 68977a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion graphite_beacon/handlers/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ def notify(self, level, alert, value, target=None, ntype=None, rule=None):

data.update(self.params)
body = urllib.urlencode(data)
yield self.client.fetch(self.url, method=self.method, body=body)

if self.method == 'GET':
url = self.url + '?' + body
yield self.client.fetch(url, method=self.method)
else:
yield self.client.fetch(self.url, method=self.method, body=body)

0 comments on commit 68977a0

Please sign in to comment.