码迷,mamicode.com
首页 > 其他好文 > 详细

Media Formatters

时间:2015-08-08 01:15:54      阅读:92      评论:0      收藏:0      [点我收藏+]

标签:

Media Type = MIME Type

指明了entity body中的格式

  • text/html
  • image/png
  • application/json
//response
HTTP/1.1 200 OK
Content-Length: 95267
Content-Type: image/png

//request
Accept: text/html,application/xhtml+xml,application/xml

 

Media Type 告诉 WebAPI 如何序列化和反序列化message body(支持格式:ML, JSON, BSON, and form-urlencoded data)

可以自定义Formatter

 

url:http://www.asp.net/web-api/overview/formats-and-model-binding/media-formatters

Media Formatters

标签:

原文地址:http://www.cnblogs.com/yfann/p/4712335.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!