application/json json类型
multipart/form-data 需要在表单中进行文件上传时,使用该格式(FormData)
Content-Type: application/x-www-form-urlcoded 表单格式(默认)
text/plain 文本类型
text/css css类型
text/html html类型
application/x-javascript js类型
application/json json类型
image/png jpg gif image/*
(/.+\.(png|jpg|gif)$/.test(pathname)) 匹配到图片
文件名后缀和Content-Type对照表HTTP content-type | 菜鸟教程 (runoob.com)