Created
April 4, 2015 15:11
-
-
Save vgrem/61d31b10da50c3a76c21 to your computer and use it in GitHub Desktop.
Example: get list item
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var client = new SPHttpClient(webUri, userName, password)) | |
{ | |
var listTitle = "Tasks"; | |
var itemId = 1; | |
var endpointUrl = string.Format("{0}/_api/web/lists/getbytitle('{1}')/items({2})",webUri,listTitle,itemId); | |
var data = client.ExecuteJson(endpointUrl); | |
Console.WriteLine(data["Title"]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment