Interface IQueryRequestReader
- Namespace
- Cratis.Arc.Queries
- Assembly
- Cratis.Arc.Core.dll
Defines a reader that turns an incoming HTTP request into a parsed QueryRequest for a specific HTTP method.
public interface IQueryRequestReader
- Extension Methods
Remarks
This is the extension point for query transports. Adding support for a new HTTP method or argument source is done by adding a new implementation — discovered automatically via IInstancesOf<T> — without changing the endpoint mapper.
Properties
EndpointNamePrefix
Gets the prefix used when naming the endpoint, keeping endpoint names unique across transports.
string EndpointNamePrefix { get; }
Property Value
HttpMethod
Gets the HTTP method this reader handles (e.g. GET, QUERY).
string HttpMethod { get; }
Property Value
IncludeInApiDescription
Gets a value indicating whether endpoints served by this reader should be included in the generated API description.
bool IncludeInApiDescription { get; }
Property Value
RequestBodyType
Gets the type of the request body this reader expects, or null when the request has no body.
Type? RequestBodyType { get; }
Property Value
ResponseCacheControl
Gets the value to set on the response Cache-Control header, or null to leave it unset.
string? ResponseCacheControl { get; }
Property Value
Methods
Read(IHttpRequestContext, IQueryPerformer)
Reads the QueryRequest from the given request context.
Task<QueryRequest> Read(IHttpRequestContext context, IQueryPerformer performer)
Parameters
contextIHttpRequestContextThe IHttpRequestContext to read from.
performerIQueryPerformerThe IQueryPerformer the request targets, used to type-convert arguments.
Returns
- Task<QueryRequest>
The parsed QueryRequest.