0

我得到“406 不可接受”。我在某处读到他们提到“我们可以在 HTTP Header 中提供内容类型”。

method: 'POST',
url: url,
headers: {'Content-Type': 'application/x-www-form-urlencoded'},

像这样,我们可以赋予 content-type 什么值?

4

1 回答 1

0

内容类型

内容类型也称为 MIME(多用途互联网邮件扩展)类型。它是一个 HTTP 标头,提供有关您向浏览器发送的内容的描述。

有很多内容类型:

text/html
text/plain
application/msword
application/vnd.ms-excel
application/jar
application/pdf
application/octet-stream
application/x-zip
images/jpeg
video/quicktime

等等

于 2015-05-19T06:34:25.913 回答