站内搜索:
首页 >> 前端 >> 内容
在ajax中设置header的Content-Type两种类型的区别讲解

时间:2018/6/9 15:30:55

post给服务器的数据类型是string,content-type有两种类型

1、application/json

发送给服务器的数据,会对数据进行JSON序列化

2、application/x-www-form-urlencoded

发送给服务器的数据,会将数据转化成query string

也就是说,content-type使用哪种类型,区别于服务器是怎么解析数据的。

  • 上一篇:分支管理提交及删除的实例讲解
  • 下一篇:IntelliJIdea常用快捷键汇总
  • 返回顶部