mirror of
https://github.com/cxfksword/jellyfin-plugin-danmu.git
synced 2026-04-24 18:41:16 +08:00
29 lines
860 B
C#
29 lines
860 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Net.Http;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Jellyfin.Plugin.Danmu.Core.Http
|
|
{
|
|
public class HttpClientHandlerEx : HttpClientHandler
|
|
{
|
|
public HttpClientHandlerEx()
|
|
{
|
|
// 忽略SSL证书问题
|
|
ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) => true;
|
|
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
|
CookieContainer = new CookieContainer();
|
|
}
|
|
|
|
protected override Task<HttpResponseMessage> SendAsync(
|
|
HttpRequestMessage request, CancellationToken cancellationToken)
|
|
{
|
|
return base.SendAsync(request, cancellationToken);
|
|
}
|
|
}
|
|
}
|