using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.IO;
namespace RestEase
{
///
/// Called by the generated REST API implementation, this knows how to invoke the API and return a suitable response
///
public interface IRequester : IDisposable
{
///
/// Invoked when the API interface method being called returns a Task
///
/// Object holding all information about the request
/// Task to return to the API interface caller
Task RequestVoidAsync(IRequestInfo requestInfo);
///
/// Invoked when the API interface method being called returns a Task{T}
///
/// Type of response object expected by the caller
/// Object holding all information about the request
/// Task to return to the API interface caller
Task RequestAsync(IRequestInfo requestInfo);
///
/// Invoked when the API interface method being called returns a Task{HttpResponseMessage}
///
/// Object holding all information about the request
/// Task to return to the API interface caller
Task RequestWithResponseMessageAsync(IRequestInfo requestInfo);
///
/// Invoked when the API interface method being called returns a Task{Response{T}}
///
/// Type of response object expected by the caller
/// Object holding all information about the request
/// Task to return to the API interface caller
Task> RequestWithResponseAsync(IRequestInfo requestInfo);
///
/// Invoked when the API interface method being called returns a Task{string}
///
/// Object holding all information about the request
/// Task to return to the API interface caller
Task RequestRawAsync(IRequestInfo requestInfo);
///
/// Invoked when the API interface method being called returns a Task{Stream}
///
/// Object holding all information about the request
/// Task to return to the API interface caller
Task RequestStreamAsync(IRequestInfo requestInfo);
}
}