我有一个这样的字符串:
form_data = '--BoUnDaRyStRiNg
Content-Disposition: form-data; name="arg"
1
--BoUnDaRyStRiNg
Content-Disposition: form-data; name="email"
somebody@example.com
--BoUnDaRyStRiNg
Content-Disposition: form-data; name="some_other_value"
333
--BoUnDaRyStRiNg--
'
它的内容类型:
content_type = 'multipart/form-data; boundary=BoUnDaRyStRiNg'
如何在不编写自定义解析器的情况下将此字符串解析为字典?
data_dict = {'arg': '1', 'email': 'somebody@example.com', 'some_other_value': '333'}