我尝试创建Windows应用商店应用。我需要发送邮件请求,但我有一个问题。 我的方法:
private async Task<string> POST(byte[] pic, string upload_url)
{
var multipartContent = new System.Net.Http.MultipartFormDataContent();
multipartContent.Add(new System.Net.Http.ByteArrayContent(pic), "photo");
var client = new HttpClient();
var response = await client.PostAsync(
new Uri(upload_url),
multipartContent);
return await response.Content.ReadAsStringAsync();
}
返回后我总是有Task成员。状态 - 等待激活。哪里出错?谢谢!