August 2018
Intermediate to advanced
366 pages
10h 14m
English
multipart is practically based on encoding multiple requests within a single body. Each part is separated by a boundary and within the boundary lies the data of that part.
Each part can provide both data and metadata, such as the content type of the provided data.
This way the receiver can know whether the contained data is binary, text, or whatever. For example, the part specifying the value for the surname field of a form would look like this:
Content-Disposition: form-data; name="surname" MySurname
And the part providing data for an uploaded file would look like this:
Content-Disposition: file; name="file1"; filename="somefile.txt" Content-Type: text/plain Some Content
Our MultiPartForm allows us to store aside both plain ...