Skip to content

Instantly share code, notes, and snippets.

@jhollingworth
Created June 7, 2010 13:06
Show Gist options
  • Save jhollingworth/428640 to your computer and use it in GitHub Desktop.
Save jhollingworth/428640 to your computer and use it in GitHub Desktop.
var request = WebRequest.Create("http://foo.com/users/123");
request.Method = "GET";
var response = (HttpWebResponse)webRequest.GetResponse();
var data = string.Empty;
using (var stream = response.GetResponseStream())
data = new StreamReader(stream).ReadToEnd();
//However you want to deserialize
var user = Deserialize<User>(data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment