Answer the question
In order to leave comments, you need to log in
How to form multipart/form-data correctly?
I can’t correctly form the form for sending a post in python 3.
An example of a form that leaves through the browser (looked in firefox):
-----------------------------157103252818570
Content-Disposition: form-data; name="next"
https://WEBSITE/jobgroup/21093/
-----------------------------157103252818570
Content-Disposition: form-data; name="csrfmiddlewaretoken"
c7fHIx9J7ARsv6ytKGz6iROHffAHKhXv
-----------------------------157103252818570
Content-Disposition: form-data; name="e-store_0"
Молком
-----------------------------157103252818570
Content-Disposition: form-data; name="e-store_1"
142
-----------------------------157103252818570
Content-Disposition: form-data; name="e-date_for_job"
20.10.2018 00:00
-----------------------------157103252818570
Content-Disposition: form-data; name="e-description"
какое то описание
-----------------------------157103252818570
Content-Disposition: form-data; name="e-specific"
101
-----------------------------157103252818570
Content-Disposition: form-data; name="e-boss_region_0"
-----------------------------157103252818570
Content-Disposition: form-data; name="e-boss_region_1"
-----------------------------157103252818570
Content-Disposition: form-data; name="e-emails"
-----------------------------157103252818570
Content-Disposition: form-data; name="e-date_comp_job"
-----------------------------157103252818570
Content-Disposition: form-data; name="e-attachment"; filename=""
Content-Type: application/octet-stream
-----------------------------157103252818570
Content-Disposition: form-data; name="e-status"
N
-----------------------------157103252818570
Content-Disposition: form-data; name="e-rating"
-----------------------------157103252818570
Content-Disposition: form-data; name="e-show_client"
on
-----------------------------157103252818570
Content-Disposition: form-data; name="e-show_remark"
on
-----------------------------157103252818570
Content-Disposition: form-data; name="e-client_code"
-----------------------------157103252818570
Content-Disposition: form-data; name="e-specific_by_brand"
-----------------------------157103252818570
Content-Disposition: form-data; name="trans_store_out_0"
-----------------------------157103252818570
Content-Disposition: form-data; name="trans_store_out_1"
-----------------------------157103252818570
Content-Disposition: form-data; name="trans_date_beg_plan"
-----------------------------157103252818570
Content-Disposition: form-data; name="specific"
-----------------------------157103252818570
Content-Disposition: form-data; name="specific_type"
-----------------------------157103252818570
Content-Disposition: form-data; name="e-save"
Сохранить
-----------------------------157103252818570--
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question