MIME type
A standardized media-type identifier, typically written as a type and subtype, that describes the format and general nature of data in a resource or message.
Go in Practice, Second Edition
A MIME type is a media-type identifier that describes the format of a file or other data, such as image/png or application/octet-stream.
- How it is used
- Validates uploaded files, classifies HTTP responses, and negotiates representations or API versions.
- How deep it goes
- Compares header, extension, and content inspection approaches, then demonstrates Go HTTP handling without detailing MIME registration.
- Examples
- Uses image/png, application/octet-stream, extension mapping, byte inspection, JSON errors, and versioned vendor media types.
- What you can do after
- Diagnose and implement file-type checks and HTTP representation handling with Go's multipart, mime, and net/http APIs.
Read how Go in Practice, Second Edition explains MIME type →
The Design of Web APIs, Second Edition
A media type is a standardized identifier describing the format and general nature of data exchanged in an HTTP message.
- How it is used
- Uses media types to describe HTTP payloads, negotiate representations, and make API formats clear to consumers and documentation tools.
- How deep it goes
- Explains declarations, headers, negotiation, alternate representations, and file formats, but defers detailed schema definitions and unsupported-format handling.
- Examples
- Uses JSON product requests, CSV transaction responses, XML transfers, hypermedia representations, and PDF, PNG, and JPEG file uploads.
- What you can do after
- Designs and documents API payload formats, then negotiates suitable representations through Accept and Content-Type headers.
Read how The Design of Web APIs, Second Edition explains MIME type →
Related concepts
- media()used by · media() is a Spring AI user-message specification method that attaches media content and its MIME type to a prompt.
- string literalkind of · A string literal is source-code notation that directly represents a string value.
- multipart/form-dataincludes · multipart/form-data is an HTTP media type that encodes form fields and files as independently typed parts within one message.
- JSONequivalent to · JSON is a standardized, language-independent text format for representing structured data using objects, arrays, strings, numbers, Boolean values, and null.
- content negotiationused by · Content negotiation is the HTTP process by which a client and server select a mutually supported representation format, language, or version.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

