Mac で実行されている .NET Core を使用して外部 API への POST 要求にクライアント証明書を含める方法についてのアイデアはありますか? nupkgWebRequestHandler
からこれを実行しますが、利用できないようです。.Microsoft.Net.Http
DNXCore,Version=v5.0 error CS0246: The type or namespace name 'WebRequestHandler' could not be found
using System.Net.Http;
public class ServiceWrapper {
public void Post() {
var handler = new WebRequestHandler();
}
}
project.json からの依存関係:
"dependencies": {
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Dapper": "1.50.0-beta8",
"Autofac": "4.0.0-rc1-177",
"Autofac.Extensions.DependencyInjection": "4.0.0-rc1-177",
"AutoMapper": "4.2.1",
"System.Xml.XmlSerializer": "4.0.11-beta-23516",
"Microsoft.AspNet.WebApi.Client": "5.2.3",
"Microsoft.Net.Http": "2.2.29",
"Microsoft.Net.Http.Client": "1.0.0-beta8-15501"
}
私の ~/.config/nuget/nuget.config:
<configuration>
<packageSources>
<add key="vnext" value="https://www.myget.org/F/aspnetvnext/api/v2" />
<add key="Official NuGet Gallery" value="https://www.nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="Official NuGet Gallery" value="https://www.nuget.org/api/v2/" />
</activePackageSource>
</configuration>