对我来说,uriTemplate是什么?

时间:2015-04-20 19:43:37

标签: c# rest restsharp

我将服务实现为

var client = new RestClient("http://localhost/xyzServices/xyzService.svc/";
var request = new RestRequest("{facilityId}/xyzs/metadata/", Method.POST);
request.AddUrlSegment("facilityId", "111");
request.AddParameter("xyzIds", _xyzIds.ToArray());

那么现在svc代码中的uriTemplate是什么?

[OperationContract]
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate =

1 个答案:

答案 0 :(得分:0)

搞清楚。

UriTemplate = "/{FacilityId}/xyzs/metadata/")];