Skip to main content

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.

Files for multipartformdata, version 1.4
Filename, size File type Python version Upload date Hashes
Filename, size MultipartFormData-1.4-py3-none-any.whl (11.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size multipartformdata-1.4.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page