Mutli-part Content-Type

Let's say if we send some data as multipart/form-data of the data as belows:

Pasted image 20230906090216.png

With the header:

Content-type: multipart/form-data; boundary=--xyz

It will separated as following:

--xyz
Content-Disposition: form-data; name="fff"; filename="GSAS_masters_resume_cover_letters.pdf"
Content-Type: application/pdf

[pdf binary]
--xyz
Content-Disposition: form-data; name="my key"
Content-Type: text/plain

{ "hi": "hello" }
--xyz
Content-Disposition: form-data; name="test"; filename="3.png"
Content-Type: image/png

[PNG DATA]
--xyz--

[!Note]
multipart/form-data will automatically determine the file content-type for us with the file name and everything so we don't have to worry about it.