【问题标题】:Period in RESTful WCF Starter KitRESTful WCF Starter Kit 中的句号
【发布时间】:2009-04-17 18:29:14
【问题描述】:

我正在使用 RESTful WFC 的 WebInvoke 和 WebGet 属性类。在 UriTemplate 参数中,我想捕获一个包含句点字符的变量。我该怎么做?

所以

[WebInvoke(Method = "PUT", UriTemplate = "{id}")]
[OperationContract]
TItem UpdateItemInXml(string id, TItem newValue);

我希望它与 url 匹配: http://service.svc/A.1

【问题讨论】:

    标签: wcf rest


    【解决方案1】:

    我找不到这样做的方法。我实现的解决方案是对 URL 中的 id 进行 base64 编码。

    【讨论】:

      猜你喜欢
      • 2011-08-26
      • 1970-01-01
      • 2010-12-19
      • 2010-12-07
      • 2010-11-03
      • 2010-10-06
      • 2023-03-05
      • 2012-03-06
      • 1970-01-01
      相关资源
      最近更新 更多