public static async Task <AnimeList> GetAnimeList(NetworkCredential credentials, string Username) { AnimeList animeList = new AnimeList(); HttpWebResponse response = null; try { response = await SendHttpWebGETRequest(credentials, MAL_URL + "animelist/" + Username + "/load.json", ContentType.JSON); if (EnsureStatusCode(response)) { StreamReader responseStream = new StreamReader(response.GetResponseStream()); string responseAsString = responseStream.ReadToEnd(); animeList = JSONConverter.DeserializeJSon <AnimeList>(responseAsString); } } catch (WebException ex) { Debug.Write("GetAnimeList: WebException response: " + ex.Status); } finally { if (response != null) { response.Dispose(); } } return(animeList); }