Created
October 22, 2008 17:40
-
-
Save deadprogram/18711 to your computer and use it in GitHub Desktop.
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
// Create the web request | |
HttpWebRequest request | |
= WebRequest.Create("https://api.del.icio.us/v1/posts/recent") as HttpWebRequest; | |
// Add authentication to request | |
request.Credentials = new NetworkCredential("username", "password"); | |
// Get response | |
using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) | |
{ | |
// Get the response stream | |
StreamReader reader = new StreamReader(response.GetResponseStream()); | |
// Console application output | |
Console.WriteLine(reader.ReadToEnd()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment