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
""" | |
Here is a way to flatten python dictionaries for making multipart/form-data POST requests. | |
{"some": ["balls", "toys"], "field": "value", "nested": {"objects": "here"}} | |
-> | |
{"some[0]": "balls", "some[1]": "toys", "field": "value", "nested[objects]": "here"} | |