【发布时间】:2015-08-28 13:24:31
【问题描述】:
我正在制作一个 Silverlight 应用程序。现在我有这个功能来做一个 POST
public async Task<Webservice> addEvent()
{
var values = new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>("email", "qewfwef"),
new KeyValuePair<string, string>("password", "qewfwef"),
new KeyValuePair<string, string>("firstname", "qewfwef"),
new KeyValuePair<string, string>("lastname", "qewfwef"),
new KeyValuePair<string, string>("picture", "123456")
};
var httpClient = new HttpClient(new HttpClientHandler());
HttpResponseMessage response = await httpClient.PostAsync(url, new FormUrlEncodedContent(values));
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
}
但是我在FormUrlEncodedContent 上出现 gpt 构建错误,有人可以帮忙吗?
这是错误:
The type or namespace name 'FormUrlEncodedContent' could not be found (are you missing a using directive or an assembly reference?)
【问题讨论】:
标签: c# silverlight windows-phone httpclient