Creating/Calling REST-Based WCF Services
As discussed previously, REST-based services allow your services to be called by any device that communicates HTTP (which is nearly everything). We demonstrated this approach using Web API. However, WCF can also be configured to work as REST-based services. REST makes your services URL-accessible from HTTP requests using GET
, POST
, PUT
, and DELETE
. They can also support JSON message format and can then be called using jQuery and AJAX.
You indicate support for REST through attributes on the WCF service methods. These attributes, WebGet
and WebInvoke
, are described as follows:
WebGet
—Indicates the service ...
Get Microsoft Visual Studio 2015 Unleashed, Third Edition 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.