using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace BinaryLane.Api.V2.Http;
///
/// Low-level request executor used by resource APIs. It is public so consuming applications can
/// compose support for a newly introduced BinaryLane endpoint before a typed resource is released.
///
public interface IBinaryLaneApiExecutor
{
/// Sends a request and returns response metadata and the deserialized body.
Task> SendAsync(
BinaryLaneRequest request,
CancellationToken cancellationToken = default);
/// Sends a request which is expected to have no response body.
Task> SendAsync(
BinaryLaneRequest request,
CancellationToken cancellationToken = default);
/// Sends a GET request.
Task GetAsync(
string path,
IReadOnlyDictionary? query = null,
CancellationToken cancellationToken = default);
/// Sends a POST request.
Task PostAsync(
string path,
object? body = null,
IReadOnlyDictionary? query = null,
CancellationToken cancellationToken = default);
/// Sends a PUT request.
Task PutAsync(
string path,
object? body = null,
IReadOnlyDictionary? query = null,
CancellationToken cancellationToken = default);
/// Sends a PATCH request.
Task PatchAsync(
string path,
object? body = null,
IReadOnlyDictionary? query = null,
CancellationToken cancellationToken = default);
/// Sends a DELETE request.
Task DeleteAsync(
string path,
object? body = null,
IReadOnlyDictionary? query = null,
CancellationToken cancellationToken = default);
}