简体   繁体   中英

Where is Microsoft.AspNet.WebApi.Client on github?

I have .NET Core library with framework set to netstandard1.6 . In the library I want to use HttpClient's extension method PostAsJsonAsync , however I want to make sure this extension method ensures OK response. Something like:

httpResponse.EnsureSuccessStatusCode()

I am assuming whole ASP.NET Core code is on GitHub. Where would I find the codebase of Microsoft.AspNet.WebApi.Client on GitHub? I could not find it here: https://github.com/aspnet

Microsoft.AspNet.WebApi.Client is unfortunately an unclear name here. The NuGet description for the package explains it like this:

This package adds support for formatting and content negotiation to System.Net.Http. It includes support for JSON, XML, and form URL encoded data.

If you look at the package more closely, you will notice that it does not contain any assembly called Microsoft.AspNet.WebApi.Client . Instead, it contains System.Net.Http.Formatting.dll which includes utilities within the System.Net.Http namespace.

With that information, it's not too difficult to find the source for this package, since the link on NuGet is actually correct.

You can find the source within the aspnet/AspNetWebStack repository .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM