Skip to content

Instantly share code, notes, and snippets.

@deadprogram
Created October 22, 2008 17:40
Show Gist options
  • Save deadprogram/18711 to your computer and use it in GitHub Desktop.
Save deadprogram/18711 to your computer and use it in GitHub Desktop.
// 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