Getting data through REST

In this recipe, we will issue a GET request to SharePoint from the browser using REST service to get data.

Getting ready

Open Internet Explorer. In this recipe, we will be using the default installation of Internet Explorer 9 (IE9). It should work the same with Internet Explorer 8 (IE8).

How to do it...

In order to get data through REST, adhere to the following steps:

  1. In Internet Explorer navigate to Tools | Internet Options | Content Tab | Feeds and Web slice settings. Make sure you have checked the Turn on feed reading view in the Advanced section.
  2. Issue a Get request to your SharePoint site: http://YOURSERVERNAME/_vti_bin/ListData.svc. Make sure to substitute your server name in the URL.
  3. This should display all the lists ...

Get Microsoft SharePoint 2010 Development with Visual Studio 2010: Expert Cookbook 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.