Created
February 9, 2017 23:23
-
-
Save MACastro987/8fd95de946db4458ac8f9ff4eda99058 to your computer and use it in GitHub Desktop.
Http Request to Weather Underground
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
const string url = @"http://api.wunderground.com/api/72002fc4632c2927/conditions/q/27519.json"; | |
async static void RetrieveData() | |
{ | |
try | |
{ | |
string contents; | |
string Url = String.Format(url); | |
HttpClient client = new HttpClient(); | |
contents = await client.GetStringAsync(url); | |
System.Diagnostics.Debug.WriteLine(contents); | |
} | |
catch (System.Exception ex) | |
{ | |
System.Diagnostics.Debug.WriteLine(ex); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment