0
一旦我通過PostAsJsonAsync發送HttpClient請求,我得到的請求實體響應太大。但我可以直接調用webapi併發送請求並返回成功響應。但通過PostAsJsonAsync它會返回413錯誤代碼。413請求實體對於HttpClient太大
這是我的代碼
var client = new HttpClient { BaseAddress = new Uri(ConfigurationManager.AppSettings.Get("API_HOST")) };
const string api = "CmSaveChange" + "/" + "SaveChange";
var response = client.PostAsJsonAsync(api, entity).Result;
var retunValue = response.Content.ReadAsAsync<HybridDictionary>().Result;