Class BodyQueryRequestReader
- Namespace
- Cratis.Arc.Queries
- Assembly
- Cratis.Arc.Core.dll
Represents an IQueryRequestReader that reads a query request from the JSON body of an HTTP QUERY request (RFC 10008).
[Singleton]
public class BodyQueryRequestReader : IQueryRequestReader
- Inheritance
-
BodyQueryRequestReader
- Implements
- Inherited Members
- Extension Methods
Constructors
BodyQueryRequestReader()
public BodyQueryRequestReader()
Properties
EndpointNamePrefix
Gets the prefix used when naming the endpoint, keeping endpoint names unique across transports.
public string EndpointNamePrefix { get; }
Property Value
HttpMethod
Gets the HTTP method this reader handles (e.g. GET, QUERY).
public string HttpMethod { get; }
Property Value
IncludeInApiDescription
Gets a value indicating whether endpoints served by this reader should be included in the generated API description.
public bool IncludeInApiDescription { get; }
Property Value
RequestBodyType
Gets the type of the request body this reader expects, or null when the request has no body.
public Type? RequestBodyType { get; }
Property Value
ResponseCacheControl
Gets the value to set on the response Cache-Control header, or null to leave it unset.
public string? ResponseCacheControl { get; }
Property Value
Methods
Read(IHttpRequestContext, IQueryPerformer)
Reads the QueryRequest from the given request context.
public 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.