Search code examples
httpprotocolsmimemultiparthttp-method

What is the difference between Multipart and MIME content type?


I have been going through the entity content type in HTTP verbs but actually I can't understand the differences of both and how they were related. Can someone explain me how both works in a transfer.


Solution

  • A mime-type is an identifier that describes the format of a HTTP body, a file, an email.

    They all follow a "major-category/specific format" structure. All images for example start with image/.

    multipart/ is also a specific class of content-types that describes a format that is really multiple 'parts' each with their own format, wrapped into one larger format.

    multipart/form-data for example is what's used when submitting a HTML form with a file, multipart/alternative is used in emails to encode both a text and HTML version for an email message. multipart/mixed is used to add attachments to email.