This project is read-only.

Native types support in UriTemplates

Feb 4, 2011 at 2:25 PM


By "Native types support in UriTemplates" I mean that you can't define a parameter as int like this (only string is supported):

        [WebGet(UriTemplate = "{id}")]
        public Contact Get(int id, HttpResponseMessage response)

I have made a post with a very simple processor for adding native type support to the UriTemplates here. Glenn Block suggested that I do a new UriTemplateProcessor to replace the one currently hosted in the project, but I had problems getting the base address of the service with an IServiceConfiguration implementation in the HttpHostConfiguration (possible bug). Nevertheless, it would be cool to have this functionality either in the next realease of WCF HTTP or in WCF HTTP Contrib if you prefer so.