Skip to content
DocsTry Aspire
DocsTry

HttpCommandOptions Properties

ClassProperties6 members
Optional configuration for resource HTTP commands added with ResourceBuilderExtensions.WithHttpCommand.
EndpointSelectorSection titled EndpointSelectornullableFunc<EndpointReference>
Gets or sets a callback that selects the HTTP endpoint to send the request to when the command is invoked.
public Func<EndpointReference>? EndpointSelector { get; set; }
GetCommandResultSection titled GetCommandResultnullableFunc<HttpCommandResultContext, Task<ExecuteCommandResult>>
Gets or sets a callback to be invoked after the response is received to determine the result of the command invocation.
public Func<HttpCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; }
HttpClientNameSection titled HttpClientNamenullablestring?
Gets or sets the name of the HTTP client to use when creating it via IHttpClientFactory.CreateClient.
public string? HttpClientName { get; set; }
MethodSection titled MethodnullableHttpMethod?
Gets or sets the HTTP method to use when sending the request.
public HttpMethod? Method { get; set; }
PrepareRequestSection titled PrepareRequestnullableFunc<HttpCommandRequestContext, Task>
Gets or sets a callback to be invoked to configure the request before it is sent.
public Func<HttpCommandRequestContext, Task>? PrepareRequest { get; set; }
Gets or sets how the HTTP response content should be returned as command result data when HttpCommandOptions.GetCommandResult is not specified. The default is HttpCommandResultMode.None.
public HttpCommandResultMode ResultMode { get; set; }