O'Reilly logo

.NET Framework 4.5 Expert Programming Cookbook by A.P. Rajshekhar

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 a WCF REST service

In the previous recipe, we implemented a ping database service using WCF. Since we are using SOAP, we need to create a separate client to consume it. What if we want to check the status of a database by passing the connection string as a query parameter and view the result using a web browser? For such scenarios, we will have to implement a ping service as a REST service.

A Representational State Transfer (REST) service uses HTTP(S) along with XML, HTML, and JSON for communication. It does not require a WSDL to discover the functionality provided or an SOAP for sending and receiving data. It uses HTTP and the HTTP methods (GET, POST, PUT, DELETE, and OPTIONS) for Create, Retrieve, Update, and Delete (CRUD) operations. ...

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