35 writes to Method
Aspire.Hosting (2)
ResourceBuilderExtensions.cs (2)
4065
commandOptions.
Method
??= HttpMethod.Post;
4184
commandOptions.
Method
= !string.IsNullOrWhiteSpace(exportOptions.MethodName) ? new HttpMethod(exportOptions.MethodName) : null;
Aspire.Hosting.Foundry (1)
HostedAgent\HostedAgentBuilderExtension.cs (1)
322
Method
= HttpMethod.Post,
Aspire.Hosting.Tests (3)
WithHttpCommandTests.cs (3)
407
.WithHttpCommand("/some-path", "Do The Get Thing", commandOptions: new() {
Method
= HttpMethod.Get })
408
.WithHttpCommand("/some-path", "Do The Get Thing", endpointName: "custom-endpoint", commandOptions: new() {
Method
= HttpMethod.Get })
506
service.WithHttpCommand("/get-only", "Do The Thing", commandName: "mycommand", commandOptions: new() {
Method
= method, HttpClientName = "commandclient" });
Stress.AppHost (29)
CommandResources.cs (29)
903
serviceBuilder.WithHttpCommand("/write-console", "Write to console", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
904
serviceBuilder.WithHttpCommand("/increment-counter", "Increment counter", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
905
serviceBuilder.WithHttpCommand("/big-trace", "Big trace", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
906
serviceBuilder.WithHttpCommand("/log-message", "Log message", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
907
serviceBuilder.WithHttpCommand("/http-command-auto-result", "HTTP command auto result", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning", ResultMode = HttpCommandResultMode.Auto, Description = "Run an HTTP command and infer the result format from the response content type" });
908
serviceBuilder.WithHttpCommand("/http-command-json-result", "HTTP command JSON result", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning", ResultMode = HttpCommandResultMode.Json, Description = "Run an HTTP command and flow the JSON response back to the caller" });
909
serviceBuilder.WithHttpCommand("/http-command-text-result", "HTTP command text result", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning", ResultMode = HttpCommandResultMode.Text, Description = "Run an HTTP command and flow the plain-text response back to the caller" });
910
serviceBuilder.WithHttpCommand("/multiple-traces-linked", "Multiple traces linked", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
911
serviceBuilder.WithHttpCommand("/overflow-counter", "Overflow counter", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
912
serviceBuilder.WithHttpCommand("/nested-trace-spans", "Out of order nested spans", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
913
serviceBuilder.WithHttpCommand("/exemplars-no-span", "Examplars with no span", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
920
Method
= HttpMethod.Post,
931
Method
= HttpMethod.Post,
942
Method
= HttpMethod.Post,
953
Method
= HttpMethod.Post,
964
Method
= HttpMethod.Post,
975
Method
= HttpMethod.Post,
986
Method
= HttpMethod.Post,
991
serviceBuilder.WithHttpCommand("/genai-trace", "Gen AI trace", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
992
serviceBuilder.WithHttpCommand("/genai-langchain-trace", "Gen AI LangChain trace", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
993
serviceBuilder.WithHttpCommand("/genai-trace-display-error", "Gen AI trace display error", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
994
serviceBuilder.WithHttpCommand("/genai-evaluations", "Gen AI evaluations", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
995
serviceBuilder.WithHttpCommand("/log-formatting", "Log formatting", commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
1002
commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
1007
commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
1012
commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
1017
commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
1022
commandOptions: new() {
Method
= HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
1029
Method
= HttpMethod.Post,
6 references to Method
Aspire.Hosting (4)
ResourceBuilderExtensions.cs (4)
3917
/// If <see cref="HttpCommandOptions.
Method
"/> is not specified, <c>POST</c> will be used.
4011
/// If <see cref="HttpCommandOptions.
Method
"/> is not specified, <c>POST</c> will be used.
4067
commandName ??= $"{endpoint.Resource.Name}-{endpoint.EndpointName}-http-{commandOptions.
Method
.Method.ToLowerInvariant()}-{path}";
4095
var request = new HttpRequestMessage(commandOptions.
Method
, uri);
Aspire.Hosting.RemoteHost.Tests (1)
AtsCapabilityScannerTests.cs (1)
448
Assert.DoesNotContain(dto.Properties, p => p.Name == nameof(HttpCommandOptions.
Method
));
Aspire.Hosting.Tests (1)
WithHttpCommandTests.cs (1)
497
var method = httpMethod is not null ? new HttpMethod(httpMethod) : HttpCommandOptions.Default.
Method
;