Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Aug 24, 2012
@martinmelin martinmelin POST to Sendgrid API when sending email, don't GET
When sending HTML emails of a nontrivial size, Sendgrid panicked due
to the URL length when using GET params.
ad9e3f5
Commits on Sep 11, 2012
@martinmelin martinmelin Send API credentials as POST arguments, too cd9e18c
Commits on Sep 12, 2012
Daniel Gross Merge pull request #1 from martinmelin/master
POST to Sendgrid instead of GET
dfcec79
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/greplin/tornado/sendgrid.py
View
6 src/greplin/tornado/sendgrid.py
@@ -49,9 +49,11 @@ def send_email(self, callback, **kwargs):
callback(None)
return
kwargs.update({'api_user':self._user, 'api_key':self._secret})
- url = "%s.%s?%s" % (self._BASE_URL, self._FORMAT, urllib.urlencode(kwargs))
+ api_url = "%s.%s" % (self._BASE_URL, self._FORMAT)
+ post_body = urllib.urlencode(kwargs)
http = httpclient.AsyncHTTPClient()
- http.fetch(url, functools.partial(self._on_sendgrid_result, callback))
+ request = httpclient.HTTPRequest(api_url, method='POST', body=post_body)
+ http.fetch(request, functools.partial(self._on_sendgrid_result, callback))
def _on_sendgrid_result(self, callback, result):

No commit comments for this range

Something went wrong with that request. Please try again.