HttpClient not supporting PostAsJsonAsync method C#

前端 未结 12 1023
花落未央
花落未央 2020-11-27 10:37

I am trying to call a web API from my web application. I am using .Net 4.5 and while writing the code I am getting the error HttpClient does not contain a defin

12条回答
  •  醉话见心
    2020-11-27 11:21

    Ok, it is apocalyptical 2020 now, and you can find these methods in NuGet package System.Net.Http.Json. But beware that it uses System.Text.Json internally.

    And if you really need to find out which API resides where, just use https://apisof.net/

提交回复
热议问题