using System.Collections.Generic;
using System.Net.Http;
using System.Reflection;
using System.Threading;
using RestEase.Implementation;
namespace RestEase
{
///
/// Class containing information to construct a request from.
/// An instance of this is created per request by the generated interface implementation
///
public interface IRequestInfo
{
///
/// Gets the HttpMethod which should be used to make the request
///
HttpMethod Method { get; }
///
/// Gets the path which should be prepended to if any
///
string? BasePath { get; }
///
/// Gets the relative path to the resource to request
///
string Path { get; }
///
/// Gets the CancellationToken used to cancel the request
///
CancellationToken CancellationToken { get; }
///
/// Gets a value indicating whether to suppress the exception on invalid status codes
///
bool AllowAnyStatusCode { get; }
///
/// Gets the query parameters to append to the request URI
///
IEnumerable QueryParams { get; }
///
/// Gets the raw query parameter infos
///
IEnumerable RawQueryParameters { get; }
///
/// Gets the parameters which should be substituted into placeholders in the Path
///
IEnumerable PathParams { get; }
///
/// Gets the values from properties which should be substituted into placeholders in the Path
///
IEnumerable PathProperties { get; }
///
/// Gets the values from properties which should be added to all query strings
///
IEnumerable QueryProperties { get; }
///
/// Gets the values from properties which should be added as HTTP request message properties
///
IEnumerable HttpRequestMessageProperties { get; }
///
/// Gets the headers which were applied to the interface
///
IEnumerable>? ClassHeaders { get; }
///
/// Gets the headers which were applied using properties
///
IEnumerable PropertyHeaders { get; }
///
/// Gets the headers which were applied to the method being called
///
IEnumerable> MethodHeaders { get; }
///
/// Gets the headers which were passed to the method as parameters
///
IEnumerable HeaderParams { get; }
///
/// Gets information the [Body] method parameter, if it exists
///
BodyParameterInfo? BodyParameterInfo { get; }
///
/// Gets the MethodInfo of the interface method which was invoked
///
MethodInfo MethodInfo { get; }
}
}