Skip to content
Browse files

Send API credentials as POST arguments, too

  • Loading branch information...
1 parent ad9e3f5 commit cd9e18c21cf73224d258e9cf2b22aa02027ecd8a @martinmelin martinmelin committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/greplin/tornado/sendgrid.py
View
5 src/greplin/tornado/sendgrid.py
@@ -48,9 +48,8 @@ def send_email(self, callback, **kwargs):
logging.error("Message not sent. Missing required argument %s", required)
callback(None)
return
- credentials = {'api_user':self._user, 'api_key':self._secret}
- api_url = "%s.%s?%s" % (self._BASE_URL, self._FORMAT,
- urllib.urlencode(credentials))
+ kwargs.update({'api_user':self._user, 'api_key':self._secret})
+ api_url = "%s.%s" % (self._BASE_URL, self._FORMAT)
post_body = urllib.urlencode(kwargs)
http = httpclient.AsyncHTTPClient()
request = httpclient.HTTPRequest(api_url, method='POST', body=post_body)

0 comments on commit cd9e18c

Please sign in to comment.
Something went wrong with that request. Please try again.