Content-Type
Domain: Internet & Web
π― Motivation
An HTTP header that tells the receiver what format the data is in: JSON, HTML, image, etc.
π Concrete Example
Content-Type: application/json (data is JSON). text/html (data is HTML). image/png (data is a PNG image). The receiver knows how to parse the data based on this header.
π Analogy
Content-Type is like a label on a package - Books (handle as books), βPerishable Foodβ (handle as food), Electronics (handle as electronics). The label tells the receiver how to handle the contents.