What are all the possible values for HTTP “Content-Type” header?

You can find every content type here: http://www.iana.org/assignments/media-types/media-types.xhtml

The most common type are:

  1. Type application

    application/EDI-X12
    application/EDIFACT
    application/javascript
    application/octet-stream
    application/ogg
    application/pdf
    application/xhtml+xml
    application/x-shockwave-flash
    application/json
    application/ld+json
    application/xml
    application/zip
    application/x-www-form-urlencoded
  2. Type audio

    audio/mpeg
    audio/x-ms-wma
    audio/vnd.rn-realaudio
    audio/x-wav
  3. Type image

    image/gif
    image/jpeg
    image/png
    image/tiff
    image/vnd.microsoft.icon
    image/x-icon
    image/vnd.djvu
    image/svg+xml
  4. Type multipart

    multipart/mixed
    multipart/alternative
    multipart/related (using by MHTML (HTML mail).)
    multipart/form-data
  5. Type text

    text/css
    text/csv
    text/html
    text/javascript (obsolete)
    text/plain
    text/xml
  6. Type video

    video/mpeg
    video/mp4
    video/quicktime
    video/x-ms-wmv
    video/x-msvideo
    video/x-flv
    video/webm
  7. Type vnd :

    application/vnd.oasis.opendocument.text
    application/vnd.oasis.opendocument.spreadsheet
    application/vnd.oasis.opendocument.presentation
    application/vnd.oasis.opendocument.graphics
    application/vnd.ms-excel
    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    application/vnd.ms-powerpoint
    application/vnd.openxmlformats-officedocument.presentationml.presentation
    application/msword
    application/vnd.openxmlformats-officedocument.wordprocessingml.document
    application/vnd.mozilla.xul+xml

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type

The Content-Type entity header is used to indicate the media type of the resource.

In responses, a Content-Type header tells the client what the content type of the returned content actually is. Browsers will do MIME sniffing in some cases and will not necessarily follow the value of this header; to prevent this behavior, the header X-Content-Type-Options can be set to nosniff.

In requests, (such as POST or PUT), the client tells the server what type of data is actually sent.

It also needs to have a MIME type of its parsed value (ignoring parameters) of either application/x-www-form-urlencoded, multipart/form-data, or text/plain.

What are all the possible values for HTTP “Content-Type” header?的更多相关文章

  1. python学习笔记之迭代器和函数(第三天)

    一.collection系列: 1.counter计数器 如果counter(dict)是对字典的一个补充,如果counter(list)则是对列表的补充,初步测试对字典的值进行排序. ####### ...

  2. Flask对请求的处理

    由http://www.cnblogs.com/steinliber/p/5133386.html 中可得服务器会把environ和start_response发送给Flask的实例app,返回的是a ...

  3. 实例:怎样使用 Netty 下载文件

    本实例主要參考的是官网的examples:点击这里 使用场景:client向Netty请求一个文件,Netty服务端下载指定位置文件到client. 本实例使用的是Http协议,当然,能够通过简单的改 ...

  4. http header cache-control (request和response区别)

    摘要:(1)网络服务会根据 request的header中的 cache-control策略设置response的cache-control策略 1 response cache-control 和 ...

  5. Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler--转载

    原文地址:https://gist.github.com/maxivak/3e3ee1fca32f3949f052 Install Solr download and install Solr fro ...

  6. WSGI的理解 perfect

    https://blog.csdn.net/hzrandd/article/details/10099871 https://blog.csdn.net/cloudxli/article/detail ...

  7. 第六模块:WEB框架开发 第1章·Django框架开发1~50

    01-Django基础介绍 02-Web应用程序1 03-Web应用程序2 04-http请求协议1 05-http请求协议2 06-http协议之响应协议 07-wsgire模块1 08-wsgir ...

  8. Python编写AWS Version 4 signing (AWS4-HMAC-SHA256) for execute-api

    官网教程中给了签署AWS请求给了详细的介绍和python的例子,但是例子针对DynamoDB API,本例子针对API Gateway的POST请求,并携带有x-amz-security-token. ...

  9. Netty学习(十)-Netty文件上传

    今天我们来完成一个使用netty进行文件传输的任务.在实际项目中,文件传输通常采用FTP或者HTTP附件的方式.事实上通过TCP Socket+File的方式进行文件传输也有一定的应用场景,尽管不是主 ...

  10. Matlab R2017b 关联 .m 和 .fig 文件

    1. 前言 安装「Matlab R2017b」后,无法关联.m和.fig文件,每次需要在MATLAB里边打开,而不能之间点击.m文件打开,十分麻烦. 2. 解决方案 1.首先,在Matlab R201 ...

随机推荐

  1. oracle批量操作

    https://stackoverflow.com/questions/39576/best-way-to-do-multi-row-insert-in-oracle 1 批量insert 方式一: ...

  2. Struts框架笔记04_拦截器_标签库

    目录 1. Struts2的拦截器 1.1 拦截器概述 1.2 拦截器的实现原理 1.3 Struts的执行流程 1.4 拦截器入门 1.4.1 环境搭建 1.4.2 编写拦截器 1.4.3 配置拦截 ...

  3. Vue.js源码中大量采用的ES6新特性介绍:模块、let、const

    1 关于ES6      ECMAScript6(以下简称ES6)是JavaScript语言的最新一代标准,发布于2015年6月,因为ECMA委员会决定从ES6起每年更新一次标准,因此ES6被改名为E ...

  4. 学习python的日常

    今天是开始正式接触python语言的第一天,然后来自前辈的知道开始了在学习过程当中用博客来记录自己的学习历程,以供自己更快地掌握这门编程语言. 大概的总结一下的话,还是按照我的编程的习惯,要学写代码, ...

  5. VueCli3 使用 NutUI (按需加载、定制化主题)

    创建vue.config.js module.exports = { css: { loaderOptions: { // 给 sass-loader 传递选项 scss: { // @/ 是 src ...

  6. flask基础2

    一个装饰器无法装饰多个函数的解决方法 当我们想在flask的多个视图函数前添加同一个装饰器时,如果什么都不做会报一个错 AssertionError: View function mapping is ...

  7. dt二次开发之-地区链接伪静态标签用法

    用法:开启伪静态功能,参照前台,看看哪里有按照地区浏览,然后打开对应的模块和模板,修改 <a href="{$MOD[linkurl]}search.php?areaid={$v[ar ...

  8. maven的使用和环境搭建

    请在博客分类的未分类中找到这篇文章

  9. Android平台5+ API提前生效,支持在plusready事件前调用

    ios上plus是一直存在的,不涉及等ready事件.但安卓上还是需要等plus ready.在安卓环境中,通常情况下需要html页面解析完成后才会让5+ API生效,安卓的执行的顺序为: 加载htm ...

  10. HttpMessageConverter(消息转换器 )和@responsebody使用(转)

    @responsebody表示该方法的返回结果直接写入HTTP response body中 一般在异步获取数据时使用,在使用@RequestMapping后,返回值通常解析为跳转路径,加上@resp ...