using System.Threading; using System.Threading.Tasks; namespace RudderSdk.Core.Abstractions; /// /// HTTP transport used by the SDK for every API call. Implementations serialize /// the request as JSON, attach the bearer token, and map non-success HTTP /// statuses to subclasses /// (401 → ). /// public interface IRudderTransport { /// /// Sends one API request and deserializes the JSON response. /// /// HTTP method (GET, POST, PUT, DELETE). /// Absolute path starting at the API root, e.g. /sdk/v1/player/information. /// Request body DTO, or null for bodyless requests. /// Current access token to send as a Bearer header, or null. /// Cancellation token. Task SendAsync( string method, string path, TRequest? request, string? accessToken, CancellationToken cancellationToken = default); }