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:
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.
Issue a
Get
request to your SharePoint site:http://YOURSERVERNAME/_vti_bin/ListData.svc.
Make sure to substitute your server name in the URL.This should display all the lists information from the site you are referring to in the URL. In our case, we are using a team site and the following screenshot shows the output:
The result is an XML response in
Atom
format.
How it works...
When you issue a GET
request to SharePoint through...