using Refit;

namespace PageFetcher.Models;

/// <summary>
/// Refit client for the internal page-fetcher-api service.
/// All calls require the <c>X-Internal-Api-Key</c> header, configured at registration time.
/// </summary>
public interface IPageFetcherApiClient
{
    /// <summary>
    /// Fetches a web page via headless Chromium and returns the rendered HTML and extracted plain text.
    /// </summary>
    [Post("/api/page/fetch")]
    Task<FetchPageResponse> FetchAsync([Body] FetchPageRequest request, CancellationToken ct = default);
}
