We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 977a02b commit 6beb2ddCopy full SHA for 6beb2dd
1 file changed
sendgrid/transport/web.py
@@ -85,7 +85,11 @@ def send(self, message):
85
86
for key in optional_params:
87
if optional_params[key]:
88
- data[key] = optional_params[key]
+ val = optional_params[key]
89
+ if isinstance(val, unicode):
90
+ data[key] = val.encode('utf-8')
91
+ elif isinstance(val, str):
92
+ data[key] = val.decode('utf-8')
93
94
data = urllib.urlencode(data, 1)
95
req = urllib2.Request(url, data)
0 commit comments