[英]Where is Microsoft.AspNet.WebApi.Client on github?
I have .NET Core library with framework set to netstandard1.6
. 我有.NET Core库,框架设置为
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. 在库中我想使用HttpClient的扩展方法
PostAsJsonAsync
,但是我想确保这个扩展方法确保OK响应。 Something like: 就像是:
httpResponse.EnsureSuccessStatusCode()
I am assuming whole ASP.NET Core code is on GitHub. 我假设整个ASP.NET核心代码在GitHub上。 Where would I find the codebase of
Microsoft.AspNet.WebApi.Client
on GitHub? 我在哪里可以找到GitHub上的
Microsoft.AspNet.WebApi.Client
的代码库? I could not find it here: https://github.com/aspnet 我在这里找不到它: https : //github.com/aspnet
Microsoft.AspNet.WebApi.Client
is unfortunately an unclear name here. 很遗憾,
Microsoft.AspNet.WebApi.Client
在这里名不清楚。 The NuGet description for the package explains it like this: 包的NuGet描述解释如下:
This package adds support for formatting and content negotiation to System.Net.Http.
此包添加了对System.Net.Http的格式和内容协商的支持。 It includes support for JSON, XML, and form URL encoded data.
它包括对JSON,XML和表单URL编码数据的支持。
If you look at the package more closely, you will notice that it does not contain any assembly called Microsoft.AspNet.WebApi.Client
. 如果仔细查看包,您会注意到它不包含任何名为
Microsoft.AspNet.WebApi.Client
程序集。 Instead, it contains System.Net.Http.Formatting.dll
which includes utilities within the System.Net.Http
namespace. 相反,它包含
System.Net.Http.Formatting.dll
,其中包含System.Net.Http
命名空间中的实用程序。
With that information, it's not too difficult to find the source for this package, since the link on NuGet is actually correct. 有了这些信息,找到这个包的源代码并不困难,因为NuGet上的链接实际上是正确的。
You can find the source within the aspnet/AspNetWebStack repository . 您可以在aspnet / AspNetWebStack存储库中找到源代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.