9

I have a string like this:

form_data = '--BoUnDaRyStRiNg
Content-Disposition: form-data; name="arg"

1
--BoUnDaRyStRiNg
Content-Disposition: form-data; name="email"

[email protected]
--BoUnDaRyStRiNg
Content-Disposition: form-data; name="some_other_value"

333
--BoUnDaRyStRiNg--
'

And it's content type:

content_type = 'multipart/form-data; boundary=BoUnDaRyStRiNg'

How do I parse this string into a dictionary without writing a custom parser?

data_dict = {'arg': '1', 'email': '[email protected]', 'some_other_value': '333'}
0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.