What are multiple http “content types” for JSON reply.?
Apart from “application/json” content type can we expect any other content types..?
Similarly, do we have any other content types for XML, YAML, & HTML HTTP response.?
Yes, JS has other MIME types other than application/json
.
This is a table of some of the MIME types.
File Extension | MIME Type | Description |
---|---|---|
.aac | audio/aac | AAC audio |
.abw | application/x-abiword | AbiWord document |
.arc | application/x-freearc | Archive document (multiple files) |
.avi | video/x-msvideo | AVI: Audio Video Interleave |
.azw | application/vnd.amazon.ebook | Amazon Kindle eBook format |
.bin | application/octet-stream | Any kind of binary data |
.bmp | image/bmp | Windows OS/2 Bitmap Graphics |
.bz | application/x-bzip | BZip archive |
.bz2 | application/x-bzip2 | BZip2 archive |
.csh | application/x-csh | C-Shell script |
.css | text/css | Cascading Style Sheets (CSS) |
.csv | text/csv | Comma-separated values (CSV) |
.doc | application/msword | Microsoft Word |
.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | Microsoft Word (OpenXML) |
.eot | application/vnd.ms-fontobject | MS Embedded OpenType fonts |
.epub | application/epub+zip | Electronic publication (EPUB) |
.gz | application/gzip | GZip Compressed Archive |
.xml | application/xml is recommended as of RFC 7303 (section 4.1), but text/xml is still used sometimes. You can assign a specific MIME type to a file with .xml extension depending on how its contents are meant to be interpreted. For instance, an Atom feed is application/atom+xml , but application/xml serves as a valid default. |
XML file |
You can see the full list here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
But I don’t think yaml is included