Convert the request data to form-data.
Project description
Multipartformdata
Convert the request data to form-data.
Convert the request data to form-data.
data:
{
'id': '23139j76h6t15f',
'name': 'yhleng'
}
Example:
from MultipartFormData.Multipart import MultipartFormData
e.g.
data_str = MultipartFormData.to_form_data(data) =>
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="id"
123131313
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="name"
yhleng
------WebKitFormBoundary7MA4YWxkTrZu0gW--
e.g.
headers = {
"content-type": "multipart/form-data; boundary=1q2w3e4r5t67u9i8u7y6t"
}
data_str = MultipartFormData.to_form_data(data, headers=headers)
--1q2w3e4r5t67u9i8u7y6t
Content-Disposition: form-data; name="id"
123131313
--1q2w3e4r5t67u9i8u7y6t
Content-Disposition: form-data; name="name"
yhleng
--1q2w3e4r5t67u9i8u7y6t--
"""
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
multipartformdata-1.3.tar.gz
(6.8 kB
view hashes)
Built Distribution
Close
Hashes for MultipartFormData-1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4bfed5f5e9cac04d578a635e55ae2380f916c0f126436205dc3e87ab3fa4ca0 |
|
MD5 | 2f2f8ed333599f31bebdc8a6b96a9817 |
|
BLAKE2b-256 | 2790bac62327ffe00457626f73090cbbd10fe43c15c3ed95f62f1cc39184b0f6 |