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. ceph luminous版部署bluestore

    简介 与filestore最大的不同是,bluestore可以直接读写磁盘,即对象数据是直接存放在裸设备上的,这样解决了一直被抱怨的数据双份写的问题 Bluestore直接使用一个原始分区来存放cep ...

  2. Centos7 docker安装GitLab

    *先决条件系统已安装Docker 1.查询GitLab镜像 docker search gitlab 2.现在GitLab镜像 3.创建文件夹 mkdir -p /software/gitlab/co ...

  3. 【spark】spark应用(分布式估算圆周率+基于Spark MLlib的贷款风险预测)

    注:本章不涉及spark和scala原理的探讨,详情见其他随笔 一.分布式估算圆周率 计算原理:假设正方形的面积S等于x²,而正方形的内切圆的面积C等于Pi×(x/2)²,因此圆面积与正方形面积之比C ...

  4. python之变量的数据类型(1)int 、bool 、str 及for循环运用

    一.变量的数据类型(1) 1.int 类型 int类型是整数,常用的有bit_length() 方法 用来返回一个数的二进制长度 2.bool类型 布尔型只有两个值 True,False 有关类型转换 ...

  5. c#版本23个设计模式

    一.引言 对设计模式的学习,自己的感触还是很多的,因为我现在在写代码的时候,经常会想想这里能不能用什么设计模式来进行重构.所以,学完设计模式之后,感觉它会慢慢地影响到你写代码的思维方式.这里对设计模式 ...

  6. Linux下安装zookeeper和启动

    原文:https://yq.aliyun.com/articles/662422 1.zookeeper官网下载安装包http://mirrors.hust.edu.cn/apache/zookeep ...

  7. P,R,F1 等性能度量(二分类、多分类)

    总结自<机器学习>周志华 2.3 目录 最常用的是查准率P(precision),查全率R(recall),F1 一.对于二分类问题 二.对于多分类问题 1.macro 2.micro 最 ...

  8. 三.protobuf3标量值类型

    Protobuf3 标量值类型 标量消息字段可以具有以下类型之一——该表显示了.proto文件中指定的类型,以及自动生成的类中的相应类型: .proto类型 说明 C++ 类型 Java 类型 Pyt ...

  9. CentOS7 部署 ElasticSearch7.0.1 集群

    环境 主机名 IP 操作系统 ES 版本 test1 192.168.1.2 CentOS7.5 7.0.1 test2 192.168.1.3 CentOS7.5 7.0.1 test3 192.1 ...

  10. 微信小程序WEB工具安装

    1.下载工具链接:http://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html?t=201715 2.安装完成后图片样式如图: 3.新 ...