【发布时间】:2015-11-27 03:55:46
【问题描述】:
我正在尝试在 Windows phone 8.1 上使用 WebView.NavigateWithHttpRequestMessage(request) 发送 POST x-www-form-urlencoded 请求
我的代码是
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, new Uri(url));
List<KeyValuePair<string, string>> content = new List<KeyValuePair<string, string>>();
content.Add(new KeyValuePair<string, string>("shop_id","123456"));
request.Content = new HttpStringContent(new HttpFormUrlEncodedContent(content).ToString(),Windows.Storage.Streams.UnicodeEncoding.Utf8, "application/x-www-form-urlencoded");
Api 返回代表“错误 id_number”的状态,但我确定它是正确的,因为我尝试使用邮递员,它返回成功的状态代码... 我错过了什么吗? 谢谢:)
【问题讨论】:
标签: c# webview windows-runtime windows-phone-8.1 winrt-xaml