mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-10-27 00:17:31 +00:00
Added LibraryHelpers.CreateHttpClientMessageHandle to standardize HttpMessageHandler creation Added REST client option for selecting HTTP protocol version Added REST client option for HTTP client keep alive interval Added HttpVersion to WebCallResult responses Updated request logic to default to using HTTP version 2.0 for dotnet core
33 lines
915 B
C#
33 lines
915 B
C#
using CryptoExchange.Net.Interfaces;
|
|
using CryptoExchange.Net.Objects;
|
|
using CryptoExchange.Net.Objects.Options;
|
|
using System;
|
|
using System.Net.Http;
|
|
|
|
namespace CryptoExchange.Net.Testing.Implementations
|
|
{
|
|
internal class TestRequestFactory : IRequestFactory
|
|
{
|
|
private readonly TestRequest _request;
|
|
|
|
public TestRequestFactory(TestRequest request)
|
|
{
|
|
_request = request;
|
|
}
|
|
|
|
public void Configure(RestExchangeOptions options, HttpClient? client)
|
|
{
|
|
}
|
|
|
|
public IRequest Create(Version httpRequestVersion, HttpMethod method, Uri uri, int requestId)
|
|
{
|
|
_request.Method = method;
|
|
_request.Uri = uri;
|
|
_request.RequestId = requestId;
|
|
return _request;
|
|
}
|
|
|
|
public void UpdateSettings(ApiProxy? proxy, TimeSpan requestTimeout, TimeSpan? httpKeepAliveInterval) {}
|
|
}
|
|
}
|