#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
#endregion
namespace Lumina.Presentation.Web.Common.Api;
///
/// Interface for typed clients that stream responses from the remote API without buffering their content.
///
public interface IStreamingApiHttpClient
{
///
/// Sends a GET request to the specified as an asynchronous operation and returns the response as a stream, without ever buffering its content in memory.
///
/// The API endpoint where the request is being sent.
/// The range and conditional headers of the incoming request to forward, so that the API,
/// which is the only party that knows the entity tag and the modification time of the resource, validates them itself.
/// Cancellation token that can be used to stop the execution.
/// The streamed response of the API request, which the caller must dispose once it has finished copying it.
Task GetStreamAsync(string endpoint, IReadOnlyDictionary requestHeaders, CancellationToken cancellationToken = default);
}