Last updated on

[C#] PostAsync 沒有回應, await 等心酸


原來的代碼:

using (var client = new HttpClient())
{

    //…

    var result = await client.PostAsync(uri, stringContent);

}

後來debug卡在那段await, 也不知道她是有發還是沒發==

改成 var result = client.PostAsync(uri, stringContent).Result; 就正常了