Skip to content
Docs Try Aspire

HttpCommandOptions Properties

Class Properties 5 members
Optional configuration for resource HTTP commands added with ResourceBuilderExtensions.WithHttpCommand."/>
EndpointSelector Section titled EndpointSelector nullable Func<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; }
GetCommandResult Section titled GetCommandResult nullable Func<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; }
HttpClientName Section titled HttpClientName nullable string?
Gets or sets the name of the HTTP client to use when creating it via IHttpClientFactory.CreateClient.
public string? HttpClientName { get; set; }
Method Section titled Method nullable HttpMethod?
Gets or sets the HTTP method to use when sending the request.
public HttpMethod? Method { get; set; }
PrepareRequest Section titled PrepareRequest nullable Func<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; }