O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

Image WebGet—Indicates the service ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required