Windows runtime 如何在windows phone 8.1通用应用程序中使用AX dynamics web服务

Windows runtime 如何在windows phone 8.1通用应用程序中使用AX dynamics web服务,windows-runtime,windows-phone-8.1,dotnet-httpclient,winrt-httpclient,Windows Runtime,Windows Phone 8.1,Dotnet Httpclient,Winrt Httpclient,我尝试在windows phone universal应用程序中使用AX dynamics安全web服务。但我不能这样做,因为windows phone运行时不支持服务模型(即,它不提供添加服务引用的选项)。因此,微软提出了一种使用HttpClient类的解决方案 因此,我做了以下工作: using (HttpClient client = new HttpClient()) { HttpRequestMessage request = new HttpR

我尝试在windows phone universal应用程序中使用AX dynamics安全web服务。但我不能这样做,因为windows phone运行时不支持服务模型(即,它不提供添加服务引用的选项)。因此,微软提出了一种使用HttpClient类的解决方案

因此,我做了以下工作:

using (HttpClient client = new HttpClient())
        {
            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "http://xxxxx/xppservice.svc/GetData");
            HttpResponseMessage response = await client.SendAsync(request);
            string data = await response.Content.ReadAsStringAsync();
            var dialog = new MessageDialog(data);
            await dialog.ShowAsync();
        }
但这里的问题是,我使用的服务是安全的,我有身份验证凭据。但我无法确定在发送请求时如何提供它们。你能帮帮我吗? A