1
我嘗試創建Windows應用商店應用。我需要發送郵件請求,但我有一個問題。 我的方法:無法將HttpStringContent轉換爲HttpContent
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();
}
總是我有返回後的任務成員。狀態 - 等待激活。哪裏出錯?謝謝!
我試過了。 Recived same ...'var stringContent = new System.Net.Http.StringContent(String.Format(「photo:{0}」,pic));'' – NickDevil 2014-10-29 07:22:57