Is Microsoft.AspNet.WebApi.Client supported in .NET Core or not?

后端 未结 3 958
鱼传尺愫
鱼传尺愫 2021-02-13 12:59

I\'m currently trying to do some JSON formatting using the HttpClient in .NET Core and MediaTypeFormatters. Especially the function "ReadAsAsync(..., MediaTypeFormatter, ..

3条回答
  •  耶瑟儿~
    2021-02-13 13:49

    In addition to the other answers, there's also the System.Net.Http.Json package that uses the new Json serializer instead of Newtonsoft's.

    The usage is slightly different than using Microsoft.AspNet.WebApi.Client.

    httpClient.GetFromJsonAsync(uri);
    

    There's a number of other overloads as well.

提交回复
热议问题