58 writes to Method
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (2)
1051_httpRequestMessage.Method = new HttpMethod(requestProperty.Method); 1237Method = HttpMethod.Head,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (1)
297this.HttpRequestMessage.Method = new HttpMethod(value);
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
DoNotRespectBrowserAcceptHeaderTests.cs (2)
101request.Method = HttpMethod.Post; 132request.Method = HttpMethod.Post;
JsonPatchInputFormatterTest.cs (1)
168Method = new HttpMethod("PATCH"),
RequestSizeLimitTest.cs (1)
82request.Method = HttpMethod.Post;
Microsoft.AspNetCore.Mvc.Testing (2)
Handlers\RedirectHandler.cs (2)
152redirect.Method = HttpMethod.Get; 156redirect.Method = response.RequestMessage.Method;
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
160requestMessage.Method = new HttpMethod(request.Method);
Microsoft.AspNetCore.TestHost (3)
RequestBuilder.cs (3)
74_req.Method = new HttpMethod(method); 84_req.Method = HttpMethod.Get; 94_req.Method = HttpMethod.Post;
Microsoft.Extensions.Http.Diagnostics.Tests (42)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
59Method = HttpMethod.Post,
Logging\AcceptanceTests.cs (9)
109Method = HttpMethod.Get, 164Method = HttpMethod.Get, 180Method = HttpMethod.Get, 245Method = HttpMethod.Get, 267Method = HttpMethod.Get, 310Method = HttpMethod.Get, 357Method = HttpMethod.Get, 422Method = HttpMethod.Get, 681Method = HttpMethod.Get,
Logging\HttpClientLoggerTest.cs (13)
85Method = HttpMethod.Get, 123Method = HttpMethod.Get, 185Method = HttpMethod.Post, 281Method = HttpMethod.Post, 386Method = HttpMethod.Post, 482Method = HttpMethod.Post, 597Method = HttpMethod.Post, 689Method = HttpMethod.Post, 732Method = HttpMethod.Post, 770Method = HttpMethod.Post, 814Method = HttpMethod.Post, 864Method = HttpMethod.Post, 959Method = 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 (8)
82Method = HttpMethod.Post, 145Method = HttpMethod.Post, 208Method = HttpMethod.Post, 283Method = HttpMethod.Post, 355Method = HttpMethod.Post, 413Method = HttpMethod.Post, 484Method = HttpMethod.Post, 551Method = HttpMethod.Post,
Telemetry\DownstreamDependencyMetadataManagerTests.cs (2)
50Method = new HttpMethod(method: httpMethod), 70Method = new HttpMethod(method: httpMethod),
Microsoft.Extensions.Http.Resilience.Tests (2)
Resilience\RequestMessageSnapshotTests.cs (2)
24Method = HttpMethod.Get, 58Method = HttpMethod.Get,
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (1)
74request.Method = HttpMethod.Get;
79 references to Method
ClientSample (1)
LoggingMessageHandler.cs (1)
27_logger.LogDebug("Send: {0} {1}", request.Method, request.RequestUri);
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (1)
292return this.HttpRequestMessage.Method.Method;
Microsoft.Arcade.Common (3)
ArcadeHttpMessageHandler.cs (3)
22request.Method.Equals(requestResponse.RequestMessage.Method)) 34Content = new StringContent($"No response specified in RequestResponses for '({request.Method}) {request.RequestUri}")
Microsoft.AspNetCore.Http.Connections.Client (2)
Internal\LoggingHttpMessageHandler.cs (2)
27Log.SendingHttpRequest(_logger, request.Method, request.RequestUri!); 33Log.UnsuccessfulHttpResponse(_logger, response.StatusCode, request.Method, request.RequestUri!);
Microsoft.AspNetCore.Identity.Test (1)
RetryHandler.cs (1)
30var method = request.Method;
Microsoft.AspNetCore.Mvc.Testing (4)
Handlers\RedirectHandler.cs (4)
64request.Method == HttpMethod.Post || request.Method == HttpMethod.Put || request.Method == HttpMethod.Patch; 156redirect.Method = response.RequestMessage.Method;
Microsoft.AspNetCore.OutputCaching.Tests (2)
OutputCacheTests.cs (2)
1069if (initialResponse.RequestMessage.Method == HttpMethod.Head && 1070subsequentResponse.RequestMessage.Method == HttpMethod.Head)
Microsoft.AspNetCore.ResponseCaching.Tests (2)
ResponseCachingTests.cs (2)
973if (initialResponse.RequestMessage.Method == HttpMethod.Head && 974subsequentResponse.RequestMessage.Method == HttpMethod.Head)
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Common\LoggingHandler.cs (2)
20_logger.LogDebug("Sending {method} {url}", request.Method, request.RequestUri); 29_logger.LogError(0, ex, "Exception while sending '{method} {url}' : {exception}", request.Method, request.RequestUri, ex);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
2980if (request.Method == HttpMethod.Get)
Microsoft.AspNetCore.SignalR.Client.Tests (19)
LongPollingTransportTests.cs (10)
237if (request.Method == HttpMethod.Delete) 282switch (request.Method.Method) 331if (request.Method == HttpMethod.Delete) 467if (request.Method == HttpMethod.Post) 472else if (request.Method == HttpMethod.Get) 485else if (request.Method == HttpMethod.Delete) 535if (request.Method == HttpMethod.Post) 540else if (request.Method == HttpMethod.Get) 553else if (request.Method == HttpMethod.Delete) 692var deleteRequest = handler.ReceivedRequests.SingleOrDefault(r => r.Method == HttpMethod.Delete);
ResponseUtils.cs (5)
36return request.Method == HttpMethod.Post && 42return request.Method == HttpMethod.Get && 49return request.Method == HttpMethod.Delete && 55return request.Method == HttpMethod.Get && request.Headers.Accept.Any(h => h.MediaType == "text/event-stream"); 60return request.Method == HttpMethod.Post &&
TestHttpMessageHandler.cs (4)
79_logger.LogDebug("Calling handlers for a '{Method}' going to '{Url}'.", request.Method, request.RequestUri); 123if (request.Method.Equals(HttpMethod.Delete) && request.RequestUri.PathAndQuery.Contains("id=")) 164if (request.Method.Equals(method) && string.Equals(request.RequestUri.PathAndQuery, pathAndQuery)) 256return Task.FromException<HttpResponseMessage>(new InvalidOperationException($"Http endpoint not implemented: {request.Method} {request.RequestUri}"));
Microsoft.AspNetCore.TestHost (1)
ClientHandler.cs (1)
115req.Method = request.Method.ToString();
Microsoft.Extensions.Http (3)
Logging\LogHelper.cs (3)
100_requestStart(logger, request.Method, GetRedactedUriString(request.RequestUri), null); 135return _beginRequestPipelineScope(logger, request.Method, formattedUri); 140_requestPipelineStart(logger, request.Method, formattedUri, null);
Microsoft.Extensions.Http.Diagnostics (7)
Http\DownstreamDependencyMetadataManager.cs (1)
52return GetRequestMetadataInternal(requestMessage.Method.Method, requestMessage.RequestUri.AbsolutePath, hostMetadata);
Logging\Internal\HttpClientLogger.cs (4)
97Log.RequestReadError(_logger, ex, request.Method, request.RequestUri?.Host, pathToLog); 167Log.LoggerContextMissing(_logger, exception, requestState, request.Method, request.RequestUri?.Host); 200Log.ResponseReadError(_logger, ex, request.Method, logRecord.Host, logRecord.Path); 234Log.EnrichmentError(_logger, e, enricher.GetType().FullName, request.Method, logRecord.Host, logRecord.Path);
Logging\Internal\HttpRequestBodyReader.cs (1)
49if (request.Content == null || request.Method == HttpMethod.Get)
Logging\Internal\HttpRequestReader.cs (1)
100logRecord.Method = request.Method;
Microsoft.Extensions.Http.Diagnostics.Tests (4)
Logging\AcceptanceTests.cs (3)
117Assert.Equal($"{httpRequestMessage.Method} {httpRequestMessage.RequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message); 361httpRequestMessage.SetRequestMetadata(new RequestMetadata(httpRequestMessage.Method.ToString(), RequestRoute)); 376.Which.Value.Should().Be(httpRequestMessage.Method.ToString());
Logging\HttpClientLoggerTest.cs (1)
441Assert.Equal($"{httpRequestMessage.Method} {httpRequestMessage.RequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message);
Microsoft.Extensions.Http.Resilience (1)
Internal\RequestMessageSnapshot.cs (1)
81_method = request.Method;
Microsoft.Extensions.Http.Resilience.Tests (2)
Resilience\RequestMessageSnapshotTests.cs (2)
79Assert.Equal(initialRequest.Method, cloned.Method);
System.Net.Http (22)
System\Net\Http\DiagnosticsHandler.cs (6)
116activity.DisplayName = HttpMethod.GetKnownMethod(request.Method.Method)?.Method ?? "HTTP"; 121KeyValuePair<string, object?> methodTag = DiagnosticsHelper.GetMethodTag(request.Method, out bool isUnknownMethod); 125activity.SetTag("http.request.method_original", request.Method.Method); 256[DynamicDependency(nameof(HttpRequestMessage.Method), typeof(HttpRequestMessage))] 289[DynamicDependency(nameof(HttpRequestMessage.Method), typeof(HttpRequestMessage))] 310[DynamicDependency(nameof(HttpRequestMessage.Method), typeof(HttpRequestMessage))]
System\Net\Http\HttpClient.cs (1)
582!string.Equals(request.Method.Method, "HEAD", StringComparison.OrdinalIgnoreCase);
System\Net\Http\HttpRequestMessage.cs (1)
189internal bool IsExtendedConnectRequest => Method == HttpMethod.Connect && _headers?.Protocol != null;
System\Net\Http\Metrics\MetricsHandler.cs (1)
145tags.Add(DiagnosticsHelper.GetMethodTag(request.Method, out _));
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (1)
147string a2 = request.Method.Method + ":" + request.RequestUri.PathAndQuery;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (2)
1487WriteBytes(request.Method.Http2EncodedBytes, ref headerBuffer); 1549if (request.Method.MustHaveRequestBody)
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (2)
623BufferBytes(request.Method.Http3EncodedBytes); 675if (request.Method.MustHaveRequestBody)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (5)
314WriteBytes(request.Method.Http1EncodedBytes); 316if (request.Method.IsConnect) 389if (request.Method.MustHaveRequestBody) 780if (request.Method.IsHead || response.StatusCode is HttpStatusCode.NoContent or HttpStatusCode.NotModified) 785else if (request.Method.IsConnect && response.StatusCode == HttpStatusCode.OK)
System\Net\Http\SocketsHttpHandler\Metrics\SocketsHttpHandlerMetrics.cs (1)
56tags.Add(DiagnosticsHelper.GetMethodTag(request.Method, out _));
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (2)
67if (RequestRequiresForceGet(response.StatusCode, request.Method)) 71Trace($"Modified request from {request.Method} to {HttpMethod.Get} in response to status code {(int)response.StatusCode} '{response.StatusCode}'.", request.GetHashCode());
System.Net.Requests (1)
System\Net\HttpWebResponse.cs (1)
225return _httpResponseMessage.RequestMessage!.Method.Method;