mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-12 08:53:01 +00:00
d44a11c44e
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
34 lines
1.2 KiB
C#
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);
|
|
}
|
|
}
|