The ultimate WCF Service contract

[ServiceContract]

public interface IRESTService { 

[OperationContract][WebInvoke(Method = "GET",UriTemplate = "*")]
Stream Get(); 

[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "*")]
Stream Post(Stream body); 

[OperationContract][
WebInvoke(Method = "PUT", UriTemplate = "*")]
Stream Put(Stream body); 

[OperationContract]
[WebInvoke(Method = "DELETE", UriTemplate = "*")]
Stream Delete();

}

WCF Service

Related Blog