简体   繁体   English

github上的Microsoft.AspNet.WebApi.Client在哪里?

[英]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.

相关问题 .NET Core 是否支持 Microsoft.AspNet.WebApi.Client? - Is Microsoft.AspNet.WebApi.Client supported in .NET Core or not? ASP.NET Core 2.0 类库中 Microsoft.AspNet.WebApi.Client 的替代方案 - Alternative to Microsoft.AspNet.WebApi.Client in ASP.NET Core 2.0 class library 找不到软件包'Microsoft.AspNet.WebApi.Client'.Net Core 2.2的编译库位置 - Cannot find compilation library location for package 'Microsoft.AspNet.WebApi.Client' .Net Core 2.2 无法与 Microsoft.AspNet.WebApi.Client 结合加载文件或程序集“Newtonsoft.Json,版本 = 6.0.0.0” - Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0 in combination with Microsoft.AspNet.WebApi.Client ASP.NET 5,Microsoft.AspNet.WebApi.Client程序包,在ASP.NET 5 beta3中未发现错误 - ASP.NET 5, Microsoft.AspNet.WebApi.Client package, not found error in ASP.NET 5 beta3 已发布的 ASP.NET 核心站点上的错误:找不到包“Microsoft.AspNet.WebApi.Client”的编译库位置 - Error on published ASP.NET core site: Cannot find compilation library location for package 'Microsoft.AspNet.WebApi.Client' 加载Microsoft.AspNet.WebApi.Client System.Net.Http.Formatting.dll时尝试查找T4文件的“缺少依赖项” - Trying to find “missing dependency” for T4 file when loading Microsoft.AspNet.WebApi.Client System.Net.Http.Formatting.dll 使用哪个Microsoft.AspNet.WebApi DLL - Which Microsoft.AspNet.WebApi DLLs to use Microsoft.AspNet.WebApi.OData与Microsoft.Data.OData和Microsoft.AspNet.OData有什么区别? - What is the difference between Microsoft.AspNet.WebApi.OData and Microsoft.Data.OData and Microsoft.AspNet.OData? 使用Microsoft.AspNet.WebApi.Versioning进行Web API 2版本控制 - Web API 2 versioning with Microsoft.AspNet.WebApi.Versioning
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM