Closed bishopmarcel closed 1 year ago
You can just use regular requests which has a json
parameter: https://requests.readthedocs.io/en/latest/user/quickstart/#more-complicated-post-requests. Closing as this is a question and not an issue. Please don't use the bug tracker for that.
What I want to express is whether the request can be supported in this way
data = {'person': [{'name': 'John', 'age': 30, 'avatar': ("John.jpg", open("John.jpg", "rb"), "image/jpeg")},
{'name': 'Jane', 'age': 25, 'avatar': ("Jane.jpg", open("Jane.jpg", "rb"), "image/jpeg")}]}
encoder = MultipartEncoder(fields=data)
data = {'person': [{'name': 'John', 'age': 30}, {'name': 'Jane', 'age': 25}]}