如何修复Windows.UI.xaml.RoutedEventArgs异常?

时间:2016-06-27 12:19:29

标签: c# uwp windows-10-universal

    public async static Task<RootObject> GetWeather(string username, string password)   
    {
        var http = new HttpClient();
        var response = await http.GetAsync(postURI);  

        var result = await response.Content.ReadAsStringAsync();
        var serializer = new DataContractJsonSerializer(typeof(RootObject));
        var ms = new MemoryStream(Encoding.UTF8.GetBytes(result));  

        var datax = (RootObject)serializer.ReadObject(ms);

        return datax;
    }

我准备好了必要的模型,并使用一些硬编码数据进行函数调用以进行测试,但它无法正常工作。

0 个答案:

没有答案