Skip to content

Instantly share code, notes, and snippets.

@saturngod
Created January 16, 2013 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saturngod/4548126 to your computer and use it in GitHub Desktop.
Save saturngod/4548126 to your computer and use it in GitHub Desktop.
var request = WebRequest.Create("http://www.ornagai.com/index.php/api/word/q/sample/format/json");
request.ContentType = "application/json; charset=utf-8";
string text;
var response = (HttpWebResponse) request.GetResponse();
using (var sr = new StreamReader(response.GetResponseStream()))
{
text = sr.ReadToEnd();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment