HTTP规范中关于消息的header实体头部Content-Type
Content-Type实体头部:
Content-Type = "Content-Type" ":" media-type
media-type = type "/" subtype *( ";" parameter )
type = token
subtype = token
parameter = attribute "=" value
attribute = token
value = token | quoted-string
比较常见的Content-Type:
Content-Type: text/plain
Content-Type: text/html
Content-Type: image/gif
Content-Type: image/jpeg
Content-Type: audio/basic
Content-Type: video/mpeg
Content-Type: application/x-www-form-urlencoded
Content-Type: application/octet-stream
Content-Type: application/PostScript
Content-Type: multipart/form-data
Content-Type: multipart/byteranges
Content-Type: multipart/mixed
Content-Type: multipart/digest
Content-Type: multipart/alternative
Content-Type: multipart/parallel
Content-Type: message/rfc822
Content-Type: message/partial
比较常见的media-type:
text/plain,text/html,image/gif,application/x-www-form-urlencoded,multipart/form-data,multipart/byteranges
media-type在
https://tools.ietf.org/html/rfc2046
https://tools.ietf.org/html/rfc4288
中有定义。
media-type application/x-www-form-urlencoded在
https://tools.ietf.org/html/draft-hoehrmann-urlencoded-00
https://tools.ietf.org/html/draft-hoehrmann-urlencoded-01
https://www.ietf.org/rfc/rfc1867.txt
中有定义。
multipart/form-data在
https://tools.ietf.org/html/rfc2388
https://tools.ietf.org/html/rfc7578
https://www.ietf.org/rfc/rfc1867.txt
中有定义。
text/html在
https://tools.ietf.org/html/rfc2854
中有定义。
text/plain在
https://tools.ietf.org/html/rfc2646
中有定义。
multipart/byteranges在
https://tools.ietf.org/html/rfc7233
中有定义。
相关推荐
要学习content-type,必须事先知道它到底是什么,是干什么用的。
Content-Type详解,主要阐述Http Header信息中Content Type类型及代表的请求数据类型
Content-type 的说明,php header 重视用的参数说明
依赖Content-Type header自动地解析request.Body
在PHP中可以通过header函数来发送头信息,还可以设置文件的content-type,下面整理了一些常见文件类型对于的content-type值。 //date 2015-06-22 //定义编码 header( 'Content-Type:text/html;charset=utf-8 '); //...
从 header 和 html content-type 获取内容字符集。 安装 go get -u github.com/mozillazg/go-charset 用法 s := `<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>` fmt . Println ( ...
内容倾向 创建并解析HTTP Content-Disposition标头安装$ npm install content-dispositionAPI var contentDisposition = require ( 'content-disposition' )contentDisposition(文件名,选项) 使用给定的文件名...
复制代码 代码如下: <?php $mimetypes = array( ‘ez’ => ‘application/andrew-inset’, ‘hqx’ =>...stream’, ‘dms’ => ‘application/octet-stream’, ‘lha’ => ‘application/octet-stream’, ‘lzh’ =>
本文章详细的介绍了关于php header中Content-disposition用法详细,有需要了解header用法的朋友可参考一下
X-Forwarded-For Header插件,此扩展允许您快速设置X-Forwarded-For HTTP标头
//Atom header(‘Content-type: application/atom+xml’); //CSS header(‘Content-type: text/css’); //Javascript header(‘Content-type: text/javascript’); //JPEG Image header(‘Content-type: ...
Http协议header说明,包括: Content-Length Content-Language Content-Disposition Content-Type Cache-Control .............. 等属性使用
const httpServer = (opts, data) => { const token = localStorage.getItem('token') const PUBLIC = `?token=${token}` let httpDefaultOpts = '' var host = `${process.env.HOST}` var prot = `${process....
用于Content-Disposition HTTP标头的小巧且经过全面测试的JS解析器,对于nodejs和浏览器环境零依赖。 该库解析标头字符串,使用可以提取的属性构造对象。 没有验证,没有转换(decodeURIComponent()除外)只是...
//Atom复制代码 代码如下:header(‘Content-type: application/atom+xml’);//CSS复制代码 代码如下:header(‘Content-type: text/css’);//Javascript复制代码 代码如下:header(‘Content-type: text/javascript’)...
Android中Recyclerview使用5----添加头部:RecyclerViewHeader,这个功能在Android开发中,也是非常常用,所以我自己写了一个例子放到这,供大家下载,和大家交流
头部 header ----------------用于头部 主要内容 main ------------用于主体内容(中部) 左侧 main-left -------------左侧布局 右侧 main-right -----------右侧布局 导航条 nav -----------------网页菜单导航条 ...
( response.setHeader()下载中文文件名乱码问题