Optional query string parameters in URITemplate in WCF?

前端 未结 5 1756
盖世英雄少女心
盖世英雄少女心 2020-12-17 07:55

I\'m developing some RESTful services in WCF 4.0. I\'ve got a method as below:

[OperationContract]
    [WebGet(UriTemplate = \"Test?format=XML&records={r         


        
5条回答
  •  庸人自扰
    2020-12-17 08:16

    According to this answer this is fixed in .NET 4.0. Failing to supply the query string parameter seems to result in its being given the default value for the type.

提交回复
热议问题