23 instantiations of HttpMethod
Aspire.Dashboard.Tests (1)
Integration\OtlpHttpServiceTests.cs (1)
313var requestMessage = new HttpRequestMessage(new HttpMethod(method), "/v1/logs");
Aspire.Hosting.Tests (1)
WithHttpCommandTests.cs (1)
212var method = httpMethod is not null ? new HttpMethod(httpMethod) : HttpCommandOptions.Default.Method;
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1051_httpRequestMessage.Method = new HttpMethod(requestProperty.Method);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (1)
297this.HttpRequestMessage.Method = new HttpMethod(value);
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Telemetry\HttpDependencyMetadataResolverTests.cs (2)
50Method = new HttpMethod(method: httpMethod), 70Method = new HttpMethod(method: httpMethod),
Microsoft.Extensions.Http.Resilience (2)
Polly\HttpRetryStrategyOptionsExtensions.cs (2)
21private static readonly HttpMethod _connect = new("CONNECT"); 22private static readonly HttpMethod _patch = new("PATCH");
Microsoft.Extensions.Http.Resilience.Tests (2)
Polly\HttpRetryStrategyOptionsExtensionsTests.cs (2)
49using var request = new HttpRequestMessage { Method = new HttpMethod(httpMethod) }; 108using var request = new HttpRequestMessage { Method = new HttpMethod(httpMethod) };
System.Net.Http (12)
System\Net\Http\HttpMethod.cs (12)
14public static HttpMethod Get { get; } = new("GET", H3StaticTable.MethodGet); 15public static HttpMethod Put { get; } = new("PUT", H3StaticTable.MethodPut); 16public static HttpMethod Post { get; } = new("POST", H3StaticTable.MethodPost); 17public static HttpMethod Delete { get; } = new("DELETE", H3StaticTable.MethodDelete); 18public static HttpMethod Head { get; } = new("HEAD", H3StaticTable.MethodHead); 19public static HttpMethod Options { get; } = new("OPTIONS", H3StaticTable.MethodOptions); 20public static HttpMethod Trace { get; } = new("TRACE", http3StaticTableIndex: -1); 21public static HttpMethod Patch { get; } = new("PATCH", http3StaticTableIndex: -1); 25public static HttpMethod Query { get; } = new("QUERY", http3StaticTableIndex: -1); 29public static HttpMethod Connect { get; } = new("CONNECT", H3StaticTable.MethodConnect); 90/// same validation being performed as by the <see cref="HttpMethod(string)"/> constructor. 94new HttpMethod(method.ToString());
System.ServiceModel.Http (1)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1170_httpRequestMessage.Method = new HttpMethod(requestProperty.Method);
287 references to HttpMethod
aspire (2)
Mcp\Docs\DocsFetcher.cs (2)
42using var request = new HttpRequestMessage(HttpMethod.Get, SmallDocsUrl); 70using var retryRequest = new HttpRequestMessage(HttpMethod.Get, SmallDocsUrl);
Aspire.Dashboard (1)
Model\Assistant\ChatClientFactory.cs (1)
137using var httpRequest = new HttpRequestMessage(HttpMethod.Get, ghcpInfoAddress);
Aspire.Dashboard.Tests (18)
Integration\HealthTests.cs (1)
30var request = new HttpRequestMessage(HttpMethod.Get, $"/{DashboardUrls.HealthBasePath}");
Integration\McpServiceTests.cs (3)
328var request = new HttpRequestMessage(HttpMethod.Post, "/mcp") 362var notificationRequest = new HttpRequestMessage(HttpMethod.Post, "/mcp") 389var request = new HttpRequestMessage(HttpMethod.Post, "/mcp")
Integration\OtlpCorsHttpServiceTests.cs (5)
29var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 54var preflightRequest1 = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 68var preflightRequest2 = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 94var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs"); 122var preflightRequest = new HttpRequestMessage(HttpMethod.Options, "/v1/logs");
Integration\OtlpHttpJsonTests.cs (1)
658var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs");
Integration\OtlpHttpServiceTests.cs (2)
143var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs"); 171var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/logs");
Integration\ResponseCompressionTests.cs (2)
25var request = new HttpRequestMessage(HttpMethod.Get, DashboardUrls.StructuredLogsBasePath); 47var request = new HttpRequestMessage(HttpMethod.Get, path);
Integration\StartupTests.cs (4)
342var request = new HttpRequestMessage(HttpMethod.Get, "/"); 398var request = new HttpRequestMessage(HttpMethod.Get, "/"); 523var request = new HttpRequestMessage(HttpMethod.Get, "/"); 1062var request = new HttpRequestMessage(HttpMethod.Get, "/");
Aspire.Hosting (5)
ApplicationModel\HttpCommandOptions.cs (1)
21public HttpMethod? Method { get; set; }
Dcp\DcpKubernetesClient.cs (3)
76var httpResponse = await SendRequest<object?>(url, HttpMethod.Get, customHeaders: null, body: null, cancellationToken).ConfigureAwait(false); 98Method = HttpMethod.Get, 124Method = HttpMethod.Patch,
ResourceBuilderExtensions.cs (1)
2446commandOptions.Method ??= HttpMethod.Post;
Aspire.Hosting.Foundry (1)
HostedAgent\HostedAgentBuilderExtension.cs (1)
154Method = HttpMethod.Post,
Aspire.Hosting.GitHub.Models (1)
GitHubModelsHealthCheck.cs (1)
38using var request = new HttpRequestMessage(HttpMethod.Post, new Uri($"{builder["Endpoint"]}/chat/completions"));
Aspire.Hosting.OpenAI (2)
OpenAIHealthCheck.cs (1)
66using var req = new HttpRequestMessage(HttpMethod.Get, s_statusPageUri);
OpenAIModelHealthCheck.cs (1)
40using var request = new HttpRequestMessage(HttpMethod.Get, new Uri($"{endpoint}/models/{model}"));
Aspire.Hosting.Tests (3)
WithHttpCommandTests.cs (3)
147.WithHttpCommand("/some-path", "Do The Get Thing", commandOptions: new() { Method = HttpMethod.Get }) 148.WithHttpCommand("/some-path", "Do The Get Thing", endpointName: "custom-endpoint", commandOptions: new() { Method = HttpMethod.Get }) 212var method = httpMethod is not null ? new HttpMethod(httpMethod) : HttpCommandOptions.Default.Method;
dotnet-sourcelink (1)
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (2)
594var requestMessage = new HttpRequestMessage(HttpMethod.Post, httpRequestUri); 1237Method = HttpMethod.Head,
GenerateDocumentationAndConfigFiles (1)
Program.cs (1)
855var request = new HttpRequestMessage(HttpMethod.Head, uri);
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
218var requestMessage = new HttpRequestMessage(HttpMethod.Post, Options.TokenEndpoint);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (16)
Logging\AcceptanceTests.cs (11)
236Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 296Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 349Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 378using var request = new HttpRequestMessage(HttpMethod.Post, "/") 409Assert.Single(requestState, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Post.ToString()); 442using var httpMessage = new HttpRequestMessage(HttpMethod.Get, "/"); 470Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 509Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Delete.ToString()); 668Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 709Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Put.ToString()); 743Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Put.ToString());
Logging\AcceptanceTests.Mvc.cs (5)
84Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 122Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 174Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 209Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString()); 252Assert.Single(state, x => x.Key == HttpLoggingTagNames.Method && x.Value == HttpMethod.Get.ToString());
Microsoft.Deployment.DotNet.Releases (1)
Utils.cs (1)
30var httpRequest = new HttpRequestMessage(HttpMethod.Head, address);
Microsoft.Extensions.AI.Evaluation.Safety (3)
ContentSafetyService.cs (3)
312requestMethod: HttpMethod.Post, 409HttpMethod? requestMethod = null, 413requestMethod ??= HttpMethod.Get;
Microsoft.Extensions.AI.Integration.Tests (1)
HttpHandlerExpectedInput.cs (1)
21public HttpMethod? Method { get; set; }
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientTests.cs (2)
2412Method = HttpMethod.Get, 2664Method = HttpMethod.Get,
Microsoft.Extensions.Http (6)
Logging\LogHelper.cs (6)
35private static readonly Action<ILogger, HttpMethod, string?, Exception?> _requestStart = LoggerMessage.Define<HttpMethod, string?>( 51private static readonly Func<ILogger, HttpMethod, string?, IDisposable?> _beginRequestPipelineScope = LoggerMessage.DefineScope<HttpMethod, string?>("HTTP {HttpMethod} {Uri}"); 53private static readonly Action<ILogger, HttpMethod, string?, Exception?> _requestPipelineStart = LoggerMessage.Define<HttpMethod, string?>(
Microsoft.Extensions.Http.Diagnostics (6)
Logging\Internal\HttpRequestBodyReader.cs (1)
39if (request.Content == null || request.Method == HttpMethod.Get)
Logging\Internal\Log.cs (4)
56[TagName(HttpClientLoggingTagNames.Method)] HttpMethod method, 64[TagName(HttpClientLoggingTagNames.Method)] HttpMethod method, 73[TagName(HttpClientLoggingTagNames.Method)] HttpMethod method, 81[TagName(HttpClientLoggingTagNames.Method)] HttpMethod method,
Logging\Internal\LogRecord.cs (1)
26public HttpMethod? Method { get; set; }
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (4)
Benchmarks\HeadersReaderBenchmark.cs (1)
35Request = new HttpRequestMessage(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\MediumHttpClientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Benchmarks\SmallHttpClientLoggingBenchmark.cs (1)
17private static HttpRequestMessage Request => new(HttpMethod.Post, "https://www.microsoft.com");
Microsoft.Extensions.Http.Diagnostics.Tests (67)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
60Method = HttpMethod.Post,
Logging\AcceptanceTests.cs (15)
47Assert.Equal($"{HttpMethod.Get} {_unreachableRequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message); 80Assert.EndsWith($"{HttpMethod.Get} {_unreachableRequestUri.Host}/{TelemetryConstants.Redacted}", firstLogRecord.Message); 88Assert.Equal($"{HttpMethod.Get} {_unreachableRequestUri.Host}/{TelemetryConstants.Redacted}", secondLogRecord.Message); 109Method = HttpMethod.Get, 164Method = HttpMethod.Get, 180Method = HttpMethod.Get, 245Method = HttpMethod.Get, 267Method = HttpMethod.Get, 310Method = HttpMethod.Get, 357Method = HttpMethod.Get, 422Method = HttpMethod.Get, 591using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 617using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 640using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, _unreachableRequestUri); 683Method = HttpMethod.Get,
Logging\HttpClientLoggerTest.cs (19)
85Method = HttpMethod.Get, 123Method = HttpMethod.Get, 173Method = HttpMethod.Post, 185Method = HttpMethod.Post, 270Method = HttpMethod.Post, 282Method = HttpMethod.Post, 377Method = HttpMethod.Post, 389Method = HttpMethod.Post, 474Method = HttpMethod.Post, 486Method = HttpMethod.Post, 590Method = HttpMethod.Post, 602Method = HttpMethod.Post, 695Method = HttpMethod.Post, 738Method = HttpMethod.Post, 776Method = HttpMethod.Post, 820Method = HttpMethod.Post, 854Method = HttpMethod.Post, 870Method = HttpMethod.Post, 967Method = HttpMethod.Post,
Logging\HttpRequestBodyReaderTest.cs (9)
42Method = HttpMethod.Post 62Method = HttpMethod.Post 86Method = HttpMethod.Post 107Method = HttpMethod.Post 135Method = HttpMethod.Post 159Method = HttpMethod.Post 186Method = HttpMethod.Post 212Method = HttpMethod.Post 233Method = HttpMethod.Get
Logging\HttpRequestReaderTest.cs (23)
51Method = HttpMethod.Post, 85Method = HttpMethod.Post, 121Method = HttpMethod.Post, 150Method = HttpMethod.Post, 181Method = HttpMethod.Post, 215Method = HttpMethod.Post, 254Method = HttpMethod.Post, 291Method = HttpMethod.Post, 332Method = HttpMethod.Post, 364Method = HttpMethod.Post, 390Method = HttpMethod.Post, 424Method = HttpMethod.Post, 463Method = HttpMethod.Post, 497Method = HttpMethod.Post, 532Method = HttpMethod.Post, 566Method = HttpMethod.Post, 628Method = HttpMethod.Get, 660using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); 690using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); 726using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); 774using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); 815using var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri); 863httpRequestMessage.Method = HttpMethod.Get;
Microsoft.Extensions.Http.Resilience (8)
Internal\RequestMessageSnapshot.cs (1)
20private HttpMethod? _method;
Polly\HttpRetryStrategyOptionsExtensions.cs (6)
21private static readonly HttpMethod _connect = new("CONNECT"); 22private static readonly HttpMethod _patch = new("PATCH"); 32HttpMethod.Delete, HttpMethod.Post, HttpMethod.Put, 45public static void DisableFor(this HttpRetryStrategyOptions options, params HttpMethod[] methods)
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (1)
128using var request = new HttpRequestMessage(HttpMethod.Get, "https://localhost:123");
Microsoft.Extensions.Http.Resilience.PerformanceTests (4)
HedgingBenchmark.cs (1)
16private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
HttpResilienceBenchmark.cs (1)
27var request = new HttpRequestMessage(HttpMethod.Post, _uri);
RetryBenchmark.cs (1)
25private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
StandardResilienceBenchmark.cs (1)
25private static HttpRequestMessage Request => new(HttpMethod.Post, _uri);
Microsoft.Extensions.Http.Resilience.Tests (28)
Hedging\HedgingTests.cs (9)
83using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 123using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 142using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 164using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 189using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 213using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 237using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 265using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 289using var request = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query");
Hedging\StandardHedgingTests.cs (5)
223using var request = new HttpRequestMessage(HttpMethod.Get, "https://key:80/discarded"); 256using var firstRequest = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 263using var secondRequest = new HttpRequestMessage(HttpMethod.Get, "https://to-be-replaced:1234/some-path?query"); 291using var request = new HttpRequestMessage(HttpMethod.Get, "https://some-endpoint:1234/some-path?query"); 338using var request = new HttpRequestMessage(HttpMethod.Get, $"https://{FailingEndpoint}:3000");
Polly\HttpRetryStrategyOptionsExtensionsTests.cs (9)
18Assert.Throws<ArgumentNullException>(() => ((HttpRetryStrategyOptions)null!).DisableFor(HttpMethod.Get)); 37Assert.Throws<ArgumentException>(() => options.DisableFor(HttpMethod.Get)); 47options.DisableFor(HttpMethod.Post, HttpMethod.Delete); 59options.DisableFor(HttpMethod.Post); 61using var request = new HttpRequestMessage { Method = HttpMethod.Get }; 71options.DisableFor(HttpMethod.Post); 73using var request = new HttpRequestMessage { Method = HttpMethod.Post }; 84options.DisableFor(HttpMethod.Post);
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (2)
38using var request = new HttpRequestMessage(HttpMethod.Head, url); 84using var request = new HttpRequestMessage(HttpMethod.Head, url);
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
41using var request = new HttpRequestMessage(HttpMethod.Get, url);
Resilience\RequestMessageSnapshotTests.cs (2)
24Method = HttpMethod.Get, 58Method = HttpMethod.Get,
Microsoft.Extensions.ML (1)
ModelLoaders\UriModelLoader.cs (1)
109var headRequest = new HttpRequestMessage(HttpMethod.Head, uri);
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
200var httpRequest = new HttpRequestMessage(HttpMethod.Get, "http://basket");
Microsoft.ML.Tokenizers (1)
Utils\Helpers.netcoreapp.cs (1)
31HttpResponseMessage response = client.Send(new HttpRequestMessage(HttpMethod.Get, url), HttpCompletionOption.ResponseHeadersRead);
Microsoft.ML.Tokenizers.Tests (1)
src\Microsoft.ML.Tokenizers\Utils\Helpers.netcoreapp.cs (1)
31HttpResponseMessage response = client.Send(new HttpRequestMessage(HttpMethod.Get, url), HttpCompletionOption.ResponseHeadersRead);
Microsoft.NET.Build.Containers (6)
AuthHandshakeMessageHandler.cs (2)
483HttpRequestMessage postMessage = new(HttpMethod.Post, realmUri) 529var message = new HttpRequestMessage(HttpMethod.Get, builder.ToString());
Registry\DefaultBlobOperations.cs (2)
33using HttpResponseMessage response = await _client.SendAsync(new HttpRequestMessage(HttpMethod.Head, new Uri(_baseUri, $"/v2/{repositoryName}/blobs/{digest}")), cancellationToken).ConfigureAwait(false); 65using HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, new Uri(_baseUri, $"/v2/{repositoryName}/blobs/{digest}")).AcceptManifestFormats();
Registry\DefaultBlobUploadOperations.cs (1)
97HttpRequestMessage patchMessage = new(HttpMethod.Patch, finalUri)
Registry\DefaultManifestOperations.cs (1)
30using HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, new Uri(_baseUri, $"/v2/{repositoryName}/manifests/{reference}")).AcceptManifestFormats();
Microsoft.NET.Sdk.Publish.Tasks (2)
Kudu\KuduVfsDeploy.cs (1)
66using (var req = new HttpRequestMessage(HttpMethod.Put, apiUrl))
Kudu\KuduZipDeploy.cs (1)
57using (var req = new HttpRequestMessage(HttpMethod.Put, DestinationUrl))
netstandard (1)
netstandard.cs (1)
1129[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Http.HttpMethod))]
NuGet.Protocol (13)
HttpSource\HttpRequestMessageFactory.cs (4)
24public static HttpRequestMessage Create(HttpMethod method, string requestUri, ILogger log) 41public static HttpRequestMessage Create(HttpMethod method, Uri requestUri, ILogger log) 59HttpMethod method, 87HttpMethod method,
HttpSource\HttpSource.cs (1)
120var requestMessage = HttpRequestMessageFactory.Create(HttpMethod.Get, request.Uri, log);
HttpSource\HttpSourceRequest.cs (2)
18: this(() => HttpRequestMessageFactory.Create(HttpMethod.Get, uri, log)) 23: this(() => HttpRequestMessageFactory.Create(HttpMethod.Get, uri, log))
LegacyFeed\ODataServiceDocumentUtils.cs (1)
30new HttpSourceRequest(() => HttpRequestMessageFactory.Create(HttpMethod.Get, url, log)),
LegacyFeed\V2FeedParser.cs (1)
587var request = HttpRequestMessageFactory.Create(HttpMethod.Get, uri, log);
Resources\PackageUpdateResource.cs (4)
496HttpMethod.Put, 650HttpMethod.Put, 769HttpMethod.Delete, 930HttpMethod.Post,
Stress.AppHost (18)
Program.cs (18)
78serviceBuilder.WithHttpCommand("/write-console", "Write to console", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 79serviceBuilder.WithHttpCommand("/write-console-large", "Write to console large", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 80serviceBuilder.WithHttpCommand("/increment-counter", "Increment counter", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 81serviceBuilder.WithHttpCommand("/big-trace", "Big trace", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 82serviceBuilder.WithHttpCommand("/trace-limit", "Trace limit", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 83serviceBuilder.WithHttpCommand("/log-message", "Log message", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 84serviceBuilder.WithHttpCommand("/log-message-limit", "Log message limit", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 85serviceBuilder.WithHttpCommand("/log-message-limit-large", "Log message limit large", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 86serviceBuilder.WithHttpCommand("/multiple-traces-linked", "Multiple traces linked", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 87serviceBuilder.WithHttpCommand("/overflow-counter", "Overflow counter", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 88serviceBuilder.WithHttpCommand("/nested-trace-spans", "Out of order nested spans", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 89serviceBuilder.WithHttpCommand("/exemplars-no-span", "Examplars with no span", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 90serviceBuilder.WithHttpCommand("/genai-trace", "Gen AI trace", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 91serviceBuilder.WithHttpCommand("/genai-langchain-trace", "Gen AI LangChain trace", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 92serviceBuilder.WithHttpCommand("/genai-trace-display-error", "Gen AI trace display error", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 93serviceBuilder.WithHttpCommand("/genai-evaluations", "Gen AI evaluations", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 94serviceBuilder.WithHttpCommand("/log-formatting", "Log formatting", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" }); 95serviceBuilder.WithHttpCommand("/big-nested-trace", "Big nested trace", commandOptions: new() { Method = HttpMethod.Get, IconName = "ContentViewGalleryLightning" });
System.Net.Http (52)
System\Net\Http\DiagnosticsHandler.cs (1)
116activity.DisplayName = HttpMethod.GetKnownMethod(request.Method.Method)?.Method ?? "HTTP";
System\Net\Http\DiagnosticsHelper.cs (3)
21internal static KeyValuePair<string, object?> GetMethodTag(HttpMethod method, out bool isUnknownMethod) 24HttpMethod? known = HttpMethod.GetKnownMethod(method.Method);
System\Net\Http\HttpClient.cs (9)
170HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 242HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 317HttpRequestMessage request = CreateRequestMessage(HttpMethod.Get, requestUri); 378SendAsync(CreateRequestMessage(HttpMethod.Get, requestUri), completionOption, cancellationToken); 391HttpRequestMessage request = CreateRequestMessage(HttpMethod.Post, requestUri); 407HttpRequestMessage request = CreateRequestMessage(HttpMethod.Put, requestUri); 423HttpRequestMessage request = CreateRequestMessage(HttpMethod.Patch, requestUri); 438SendAsync(CreateRequestMessage(HttpMethod.Delete, requestUri), cancellationToken); 825private HttpRequestMessage CreateRequestMessage(HttpMethod method, Uri? uri) =>
System\Net\Http\HttpMethod.cs (23)
9public partial class HttpMethod : IEquatable<HttpMethod> 14public static HttpMethod Get { get; } = new("GET", H3StaticTable.MethodGet); 15public static HttpMethod Put { get; } = new("PUT", H3StaticTable.MethodPut); 16public static HttpMethod Post { get; } = new("POST", H3StaticTable.MethodPost); 17public static HttpMethod Delete { get; } = new("DELETE", H3StaticTable.MethodDelete); 18public static HttpMethod Head { get; } = new("HEAD", H3StaticTable.MethodHead); 19public static HttpMethod Options { get; } = new("OPTIONS", H3StaticTable.MethodOptions); 20public static HttpMethod Trace { get; } = new("TRACE", http3StaticTableIndex: -1); 21public static HttpMethod Patch { get; } = new("PATCH", http3StaticTableIndex: -1); 25public static HttpMethod Query { get; } = new("QUERY", http3StaticTableIndex: -1); 29public static HttpMethod Connect { get; } = new("CONNECT", H3StaticTable.MethodConnect); 55public bool Equals([NotNullWhen(true)] HttpMethod? other) => 60obj is HttpMethod method && 75public static bool operator ==(HttpMethod? left, HttpMethod? right) => 80public static bool operator !=(HttpMethod? left, HttpMethod? right) => 83/// <summary>Parses the provided <paramref name="method"/> into an <see cref="HttpMethod"/> instance.</summary> 85/// <returns>An <see cref="HttpMethod"/> instance for the provided <paramref name="method"/>.</returns> 89/// if "get" is specified. For unknown methods, a new <see cref="HttpMethod"/> instance is returned, with the 92public static HttpMethod Parse(ReadOnlySpan<char> method) => 96internal static HttpMethod? GetKnownMethod(ReadOnlySpan<char> method) 100HttpMethod? match = (method[0] | 0x20) switch
System\Net\Http\HttpMethod.SocketsHttpHandler.cs (3)
51HttpMethod? knownMethod = GetKnownMethod(Method); 72HttpMethod? knownMethod = GetKnownMethod(Method); 93HttpMethod? knownMethod = GetKnownMethod(Method);
System\Net\Http\HttpRequestMessage.cs (6)
28private HttpMethod _method; 86public HttpMethod Method 121: this(HttpMethod.Get, (Uri?)null) 125public HttpRequestMessage(HttpMethod method, Uri? requestUri) 138public HttpRequestMessage(HttpMethod method, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) 195internal bool IsExtendedConnectRequest => Method == HttpMethod.Connect && _headers?.Protocol != null;
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
778HttpRequestMessage tunnelRequest = new HttpRequestMessage(HttpMethod.Connect, _proxyUri);
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (6)
70Trace($"Modified request from {request.Method} to {HttpMethod.Get} in response to status code {(int)response.StatusCode} '{response.StatusCode}'.", request.GetHashCode()); 73request.Method = HttpMethod.Get; 158private static bool RequestRequiresForceGet(HttpStatusCode statusCode, HttpMethod requestMethod) 165return requestMethod == HttpMethod.Post; 167return requestMethod != HttpMethod.Get && requestMethod != HttpMethod.Head;
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpResponseParser.cs (1)
69if (response.RequestMessage.Method != HttpMethod.Head)
System.Net.Requests (4)
System\Net\HttpWebRequest.cs (4)
39private string _originVerb = HttpMethod.Get.Method; 1077if (string.Equals(HttpMethod.Get.Method, _originVerb, StringComparison.OrdinalIgnoreCase) || 1078string.Equals(HttpMethod.Head.Method, _originVerb, StringComparison.OrdinalIgnoreCase) || 1201_sendRequestMessage = new HttpRequestMessage(HttpMethod.Parse(_originVerb), _requestUri);
System.ServiceModel.Http (2)
System\ServiceModel\Channels\HttpChannelFactory.cs (2)
690var requestMessage = new HttpRequestMessage(HttpMethod.Post, httpRequestUri); 1352Method = HttpMethod.Head,