Inserting new contacts through REST

We now know we can use REST requests to get data from SharePoint lists, how about adding data to the list from the client applications? In this recipe, we will see how to do just that.

Getting ready

You need to have completed the previous recipes and understand the REST calls that are made in the previous recipes.

How to do it...

In order to insert a new contact through REST, adhere to the following steps:

  1. Open Visual Studio 2010, and create a console application project.
  2. Name the project RESTUpdate. Visual Studio will create the necessary files and bring you to Program.cs. This is where you will write your code to add the new contact.
  3. Right-click on the references and click on Add Service Reference. This will bring ...

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.