C# .NET 4.5 HTTP/2客户端代码
public class ForceHttp2Handler : DelegatingHandler
{
public ForceHttp2Handler(HttpMessageHandler innerHandler)
: base(innerHandler)
{
}
protected override Task
HttpRequestMessage request, CancellationToken cancellationToken)
{
request.Version = new Version(2, 0);
return base.SendAsync(request, cancellatio
共有 0 条评论