19 lines
557 B
C#
19 lines
557 B
C#
|
|
using System.Net.Http;
|
||
|
|
using GitHub.Runner.Sdk;
|
||
|
|
|
||
|
|
namespace GitHub.Runner.Common
|
||
|
|
{
|
||
|
|
[ServiceLocator(Default = typeof(HttpClientHandlerFactory))]
|
||
|
|
public interface IHttpClientHandlerFactory : IRunnerService
|
||
|
|
{
|
||
|
|
HttpClientHandler CreateClientHandler(RunnerWebProxy webProxy);
|
||
|
|
}
|
||
|
|
|
||
|
|
public class HttpClientHandlerFactory : RunnerService, IHttpClientHandlerFactory
|
||
|
|
{
|
||
|
|
public HttpClientHandler CreateClientHandler(RunnerWebProxy webProxy)
|
||
|
|
{
|
||
|
|
return new HttpClientHandler() { Proxy = webProxy };
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|