首页 > 其他 > 详细

Postman header 中的 Content-Type

时间:2021-07-03 22:32:54      阅读:28      评论:0      收藏:0      [点我收藏+]

request headers中的content-type:

  在开发中,当前端要 POST 发送数据到后端时,通常需要注意设置请求头 header 中的 Content-Type 类型。content-type 的作用是让服务器端对 post 请求中请求体 entity body 中的数据进行解码,获取到对应的数据格式。http 中的 post 请求使用最多的Content-Type 类型是: application/json。application/json是用来告诉服务端消息主体是序列化后的 JSON 字符串,其中一个好处就是JSON 格式支持比键值对复杂得多的结构化数据。

 

response header中的content-type:

  content-type是响应消息报头中的一个参数,标识响应正文数据的格式

Postman header 中的 Content-Type

原文:https://www.cnblogs.com/yaoze2018/p/14967599.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!