HttpWebRequest songRequest HttpWebRequest WebRequest Create http ws au

1
2
3
4
5
6
7
8
HttpWebRequest songRequest = (HttpWebRequest)WebRequest.Create("http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=dockgg&api_key=e28039161acc777b14cfb09eb41ef896&limit=1&format=json");
HttpWebResponse songResponse = (HttpWebResponse)songRequest.GetResponse();
string songResult = new StreamReader(songResponse.GetResponseStream(), Encoding.UTF8).ReadToEnd();
songResult = songResult.Replace("{\"#", "{\"");
songResult = songResult.Replace("@", "");
var Artist = JsonConvert.DeserializeObject<Artist>(songResult);
songName.Text = Artist.text;