WCF Service的Restfull风格

怎样构建?

您需要什么样的资源?
将使用哪些 URI 表示这些资源?
每个 URI 将支持统一接口的哪些部件(HTTP 动词)? 
 
URI的处理
 
UriTemplate
System.UriTemplate --  构建URI
System.UriTemplateMatch分析URI   
 
 
WCF 约定中的 HTTP 动词
 
WebGetAttribute
HTTP GET 动词所使用
WebInvokeAttribute
HTTP GET 以外的其他任何 HTTP 动词所使用
 
传输格式的转换
 
WebHttpBinding
支持 XMLJSON 和原始二进制数据
WebHttpBehavior
WebHttpBinding配合使用
提供必要格式化程序和操作选择器等
ResponseFormat = WebMessageFormat.Json
指定Response格式
原文地址:https://www.cnblogs.com/fang-beny/p/3653389.html