Mapping URL suffix to operation parameters

Since WCF REST services use normal HTTP GET/POST for operation invocation, all the operation-wide data, like parameters and return value, are encapsulated in a HTTP message body or request header. And for WCF REST operations based on HTTP GET, the parameters are directly embedded in the URL string. By default, HTTP GET-based REST operations will use a query string for carrying input parameters. However, in real-world REST service scenarios, it is more common that we need to use more user-friendly URLs instead of the auto-generated query-string-based syntax so that the client consumers can call the REST service operations more conveniently.

In this recipe, we will demonstrate how we can use the UriTemplate ...

Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.