Testing the RESTful service in a browser

We have finished modifying the existing NorthwindService to be a RESTful WCF service. Before building our own client to test it, let's test it with a browser.

To test the RESTful WCF service, first rebuild the solution, then open Internet Explorer and enter the following URL in the address bar of the browser: http://localhost/RESTNorthwindService/ProductService.svc/Product/5.

Depending on your browser's settings, you might be prompted to open/save the response file, or you might get the following content displayed on your browser:

{"Discontinued":true,"ProductID":5,"ProductName":
"Chef Anton's Gumbo Mix","QuantityPerUnit":"36 boxes","RowVersion":[0,0,0,0,0,0,7,252],
"UnitPrice":21.3500}

This shows the JSON-formatted ...

Get WCF Multi-layer Services Development with Entity Framework Fourth 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.