We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6beb2dd commit 8647e15Copy full SHA for 8647e15
1 file changed
sendgrid/transport/web.py
@@ -85,11 +85,9 @@ def send(self, message):
85
86
for key in optional_params:
87
if optional_params[key]:
88
- 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')
+ data[key] = optional_params[key]
+ if isinstance(data[key], unicode):
+ data[key] = data[key].encode('utf-8')
93
94
data = urllib.urlencode(data, 1)
95
req = urllib2.Request(url, data)
0 commit comments