content type:创建和解析HTTP Content Type标头 源码

上传:qqpreserve53896 浏览: 13 推荐: 0 文件:ZIP 大小:8.57KB 上传时间:2021-02-10 04:32:56 版权申诉
内容类型 根据RFC 7231创建和解析HTTP Content-Type标头 安装 $ npm install content-type API var contentType = require ( 'content-type' ) contentType.parse(字符串) var obj = contentType . parse ( 'image/svg+xml; charset=utf-8' ) 解析Content-Type标头。 这将返回具有以下属性的对象(示例显示为字符串'image/svg+xml; charset=utf-8' ): type :媒体类型(类型和
上传资源
用户评论