Last active
August 29, 2015 14:18
-
-
Save vgrem/fa575fa128a8fc8151d4 to your computer and use it in GitHub Desktop.
Example: Get List Items
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 endpointUrl = string.Format("{0}/_api/web/lists/getbytitle('{1}')/items",webUri,listTitle); | |
var data = client.ExecuteJson(endpointUrl); | |
foreach (var item in data["value"]) | |
{ | |
Console.WriteLine(item["Title"]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment