WebMessageBodyStyle Comparisons
The WebMessageBodyStyle parameter on your WebGet and WebInvoke
attribute determines how the data will be packaged. The four service methods in this example all do the exact same thing: return the PersonDto with ID = 1.
The only difference is how the data is packaged.
Note that RestCake abstracts all this away from you when you use the javascript proxy classes. You simply need to call the service
methods using a js proxy instance, and the proxy will take care of wrapping the request or unwrapping the response if necessary.
When using the js proxies, you really don't have to know what WebMessageBodyStyle is being used. You only need to be aware of it when you
create your actual service methods in RestHttpHandler classes. If you have multiple POSTed arguments, you are required to use
WebMessageBodyStyle.Wrapped or WebMessageBodyStyle.WrappedRequest, since only a "single" posted argument
can be sent.