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

string

HttpMethod

Gets the HTTP method this reader handles (e.g. GET, QUERY).

public string HttpMethod { get; }

Property Value

string

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

bool

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

Type

ResponseCacheControl

Gets the value to set on the response Cache-Control header, or null to leave it unset.

public string? ResponseCacheControl { get; }

Property Value

string

Methods

Read(IHttpRequestContext, IQueryPerformer)

Reads the QueryRequest from the given request context.

public Task<QueryRequest> Read(IHttpRequestContext context, IQueryPerformer performer)

Parameters

context IHttpRequestContext

The IHttpRequestContext to read from.

performer IQueryPerformer

The IQueryPerformer the request targets, used to type-convert arguments.

Returns

Task<QueryRequest>

The parsed QueryRequest.