1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-12 08:53:01 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/Interfaces/IRequestFactory.cs
T
Jkorf d44a11c44e HttpVersion update
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
2025-09-01 10:12:59 +02:00

34 lines
1.2 KiB
C#

using CryptoExchange.Net.Objects;
using CryptoExchange.Net.Objects.Options;
using System;
using System.Net.Http;
namespace CryptoExchange.Net.Interfaces
{
/// <summary>
/// Request factory interface
/// </summary>
public interface IRequestFactory
{
/// <summary>
/// Create a request for an uri
/// </summary>
IRequest Create(Version httpRequestVersion, HttpMethod method, Uri uri, int requestId);
/// <summary>
/// Configure the requests created by this factory
/// </summary>
/// <param name="options">Rest client options</param>
/// <param name="httpClient">Optional shared http client instance</param>
void Configure(RestExchangeOptions options, HttpClient? httpClient = null);
/// <summary>
/// Update settings
/// </summary>
/// <param name="proxy">Proxy to use</param>
/// <param name="requestTimeout">Request timeout to use</param>
/// <param name="httpKeepAliveInterval">Http client keep alive interval</param>
void UpdateSettings(ApiProxy? proxy, TimeSpan requestTimeout, TimeSpan? httpKeepAliveInterval);
}
}