Appendix A. Media Types

Table A-1. Media types
Media typeDescriptionReference

text/html

Used for exchanging HTML documents.

http://www.iana.org/assignments/media-types/text/html

application/xhtml+xml

Used for exchanging HTML documents that use well-formed XML.

http://tools.ietf.org/html/rfc3236

application/xml

Used for exchanging XML documents and schemas.

http://www.rfc-editor.org/rfc/rfc3023.txt

application/json

Used for exchanging JSON documents.

http://www.ietf.org/rfc/rfc4627.txt

application/x-www-form-urlencoded

Used for exchanging form key/value data.

http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1

multipart/mixed

Used for exchanging multiple sets of data combined into a single body.

http://tools.ietf.org/html/rfc1521#section-7.2.2

multipart/form-data

Used primarily for exchanging files.

http://tools.ietf.org/html/rfc2388

image/jpeg

Used for exchanging JPEG documents.

http://tools.ietf.org/html/rfc2046

image/gif

Used for exchanging GIF documents.

http://tools.ietf.org/html/rfc2046

image/png

Used for exchanging PNG documents.

http://tools.ietf.org/html/rfc2083

image/svg+xml

Used for exchanging SVG (http://www.w3.org/TR/SVG11/) documents.

http://www.w3.org/TR/SVG/mimereg.html

application/atom+xml

Used for exchanging Atom feeds.

http://tools.ietf.org/html/rfc4287

application/vnd.hal+json

Used for exchanging data that contains links to related resourcess

http://stateless.co/hal_specification.html

application/vnd.collection+json

Used for managing collections of data.

http://amundsen.com/media-types/collection/

Get Designing Evolvable Web APIs with ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.