This is a HTTP POST request sent with the request body specially formatted as a series of “parts”, separated by a boundary string. It allows a mix for form data, files etc to be sent as a HTTP POST.


Example 1

<form action="my_post_page.php" method="post" enctype="multipart/form-data">

html that is sent
POST /submit.cgi HTTP/1.1
User-Agent: curl/7.46.0
Accept: */*
Content-Length: 313
Expect: 100-continue
Content-Type: multipart/form-data; boundary=------MyFormBoundaryvZ0ZHShNAcBABWFy
Content-Disposition: form-data; name="fileToUpload"; filename="data.txt"
Content-Type: text/plain

Content-Disposition: form-data; name="secret"; filename="file.txt"
Content-Type: text/plain

The contents of this file

The last boundary has “–” added to the end of it

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.


Your email address will not be published.