Last active
August 26, 2016 20:15
-
-
Save sido378/d0990443d763af88411aeae388e0a0b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## alte lösung, funzt nicht: | |
data = { | |
"recipient[id]": recipient_id, | |
"message[attachment][type]": "image", | |
"message[attachment][payload][]": "" | |
} | |
items = [] | |
for name, value in data.items(): | |
items.append(MultipartParam(name, value)) | |
## alte lösung, neuer versuch, funzt auch nicht: | |
data = { | |
"recipient[id]": str(recipient_id), | |
"message[attachment][type]": "image", | |
"message[attachment][payload][]": "" | |
} | |
items = [] | |
for name, value in data.items(): | |
items.append(MultipartParam(name, value)) | |
## neue lösung, funzt noch nicht: | |
items.append(MultipartParam("recipient", {"id": recipient_id })) | |
items.append(MultipartParam("message", {"attachment":{"type":"image", "payload":{}}})) | |
## neue lösung, jetzt funzts wegen str(recipient_id): | |
items.append(MultipartParam("recipient", {"id": str(recipient_id) })) | |
items.append(MultipartParam("message", {"attachment":{"type":"image", "payload":{}}})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment