56 writes to RequestUri
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1238RequestUri = requestUri
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (1)
313this.HttpRequestMessage.RequestUri = uriBuilder.Uri;
InMemory.FunctionalTests (7)
EventSourceTests.cs (1)
190RequestUri = new Uri("https://localhost/"),
Http2\Http2EndToEndTests.cs (1)
67RequestUri = new Uri("http://localhost/"),
KestrelMetricsTests.cs (5)
569RequestUri = new Uri("http://localhost/"), 648RequestUri = new Uri("http://localhost/"), 726RequestUri = new Uri("https://localhost/"), 807RequestUri = new Uri("http://localhost/"), 895RequestUri = new Uri("https://localhost/"),
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
JsonPatchInputFormatterTest.cs (1)
169RequestUri = new Uri("http://localhost/jsonpatch/PatchProduct")
RequestSizeLimitTest.cs (1)
84request.RequestUri = new Uri("http://localhost/RequestSizeLimit/DisableRequestSizeLimit");
Microsoft.AspNetCore.Mvc.Testing (1)
Handlers\RedirectHandler.cs (1)
147redirect.RequestUri = location;
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
159requestMessage.RequestUri = uri;
Microsoft.Extensions.Http.Diagnostics.Tests (33)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
60RequestUri = new($"http://default-uri.com/foo")
Logging\AcceptanceTests.cs (9)
110RequestUri = _unreachableRequestUri, 165RequestUri = _unreachableRequestUri, 181RequestUri = _unreachableRequestUri, 246RequestUri = _unreachableRequestUri, 268RequestUri = _unreachableRequestUri, 311RequestUri = new Uri(RequestPath), 358RequestUri = new Uri(RequestPath) 423RequestUri = new Uri(RequestPath), 682RequestUri = _unreachableRequestUri,
Logging\HttpClientLoggerTest.cs (13)
86RequestUri = new("http://default-uri.com"), 124RequestUri = new("http://default-uri.com"), 186RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 282RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 387RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 483RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 598RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 690RequestUri = new($"http://default-uri.com/foo/bar"), 733RequestUri = new($"http://default-uri.com/foo/bar"), 771RequestUri = new($"http://default-uri.com/foo/bar"), 815RequestUri = new($"http://default-uri.com/foo/bar"), 865RequestUri = new($"http://{expectedLogRecord.Host}/{expectedLogRecord.Path}"), 960RequestUri = new($"http://default-uri.com/foo/bar"),
Logging\HttpRequestReaderTest.cs (8)
83RequestUri = new Uri("http://default-uri.com/foo"), 146RequestUri = null, 209RequestUri = new Uri("http://default-uri.com/foo/bar/123"), 284RequestUri = new Uri($"http://{RequestedHost}/foo/bar/123"), 356RequestUri = new Uri("http://default-uri.com/foo/bar/123"), 414RequestUri = new Uri("http://default-uri.com/foo/bar/123"), 485RequestUri = new Uri("http://default-uri.com/foo/bar/123"), 552RequestUri = new Uri("http://default-uri.com/foo/bar/123"),
Telemetry\DownstreamDependencyMetadataManagerTests.cs (2)
51RequestUri = new Uri(uriString: urlString) 71RequestUri = new Uri(uriString: urlString)
Microsoft.Extensions.Http.Resilience (2)
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (1)
107requestMessage.RequestUri = requestMessage.RequestUri!.ReplaceHost(route);
Routing\Internal\RoutingResilienceStrategy.cs (1)
53request.RequestUri = request.RequestUri!.ReplaceHost(route!);
Microsoft.Extensions.Http.Resilience.Tests (2)
Resilience\RequestMessageSnapshotTests.cs (2)
23RequestUri = new Uri("https://dummy-uri.com?query=param"), 57RequestUri = new Uri("https://dummy-uri.com?query=param"),
Microsoft.Extensions.ServiceDiscovery (4)
Http\ResolvingHttpClientHandler.cs (2)
26request.RequestUri = ResolvingHttpDelegatingHandler.GetUriWithEndpoint(originalUri, result, _options); 34request.RequestUri = originalUri;
Http\ResolvingHttpDelegatingHandler.cs (2)
47request.RequestUri = GetUriWithEndpoint(originalUri, result, _options); 57request.RequestUri = originalUri;
System.Net.Http (2)
System\Net\Http\HttpClient.cs (1)
771request.RequestUri = requestUri;
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (1)
66request.RequestUri = redirectUri;
206 references to RequestUri
Aspire.Dashboard.Tests (1)
Integration\FrontendBrowserTokenAuthTests.cs (1)
47Assert.Equal(DashboardUrls.LoginUrl(returnUrl: DashboardUrls.StructuredLogsUrl()), response.RequestMessage!.RequestUri!.PathAndQuery);
Aspire.EndToEnd.Tests (1)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
479var msg = $"Retry #{args.AttemptNumber+1} for '{args.Outcome.Result?.RequestMessage?.RequestUri}'" +
Aspire.Workload.Tests (1)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
479var msg = $"Retry #{args.AttemptNumber+1} for '{args.Outcome.Result?.RequestMessage?.RequestUri}'" +
AuthSamples.FunctionalTests (5)
CookiesTests.cs (1)
40Assert.Equal("http://localhost/account/login?ReturnUrl=%2FHome%2FMyClaims", response.RequestMessage.RequestUri.ToString());
CustomPolicyProviderTests.cs (2)
44Assert.Equal("http://localhost/account/signin?ReturnUrl=%2FHome%2FMinimumAge10", response.RequestMessage.RequestUri.ToString()); 118Assert.Equal("http://localhost/account/signin?ReturnUrl=%2FHome%2FMinimumAge50", response.RequestMessage.RequestUri.ToString());
PathSchemeSelectionTests.cs (1)
53Assert.Equal("http://localhost/account/login?ReturnUrl=%2FHome%2FMyClaims", response.RequestMessage.RequestUri.ToString());
TestAssert.cs (1)
85.Address(response.RequestMessage.RequestUri)
ClientSample (2)
LoggingMessageHandler.cs (2)
27_logger.LogDebug("Send: {0} {1}", request.Method, request.RequestUri); 29_logger.LogDebug("Recv: {0} {1}", (int)result.StatusCode, request.RequestUri);
dotnet-svcutil-lib (13)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (3)
955SRServiceModel.HttpRequestTimedOut, _httpRequestMessage.RequestUri, _timeoutHelper.OriginalTimeout))); 1020SRServiceModel.HttpResponseTimedOut, _httpRequestMessage.RequestUri, timeoutHelper.OriginalTimeout))); 1231var requestUri = _httpRequestMessage.RequestUri;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelHelpers.cs (3)
137return new CommunicationException(string.Format(SRServiceModel.HttpReceiveFailure, request.RequestUri), exception); 139return new EndpointNotFoundException(string.Format(SRServiceModel.EndpointNotFound, request.RequestUri.AbsoluteUri), exception); 141return new SecurityNegotiationException(string.Format(SRServiceModel.TrustFailure, request.RequestUri.Authority), exception);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (2)
305string query = this.HttpRequestMessage.RequestUri.Query; 311UriBuilder uriBuilder = new UriBuilder(this.HttpRequestMessage.RequestUri);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageHelper.cs (4)
323throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new EndpointNotFoundException(string.Format(SRServiceModel.EndpointNotFound, _httpRequestMessage.RequestUri.AbsoluteUri))); 328throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ServerTooBusyException(string.Format(SRServiceModel.HttpServerTooBusy, _httpRequestMessage.RequestUri.AbsoluteUri))); 338throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ProtocolException(string.Format(SRServiceModel.MissingContentType, _httpRequestMessage.RequestUri))); 341throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ProtocolException(string.Format(SRServiceModel.FramingContentTypeMismatch, _httpRequestMessage.Content.Headers.ContentType.ToString(), _httpRequestMessage.RequestUri)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (1)
343Fx.Assert(request.RequestUri.Scheme == UriEx.UriSchemeHttps,
Interop.FunctionalTests (1)
Http2\Http2RequestTests.cs (1)
297logger.LogInformation($"Sending request to '{request.RequestUri}'.");
Microsoft.Arcade.Common (3)
ArcadeHttpMessageHandler.cs (3)
21if(request.RequestUri.ToString().StartsWith(requestResponse.RequestMessage.RequestUri.ToString()) && 34Content = new StringContent($"No response specified in RequestResponses for '({request.Method}) {request.RequestUri}")
Microsoft.AspNetCore.Authentication.Test (38)
FacebookTests.cs (5)
333if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == FacebookDefaults.TokenEndpoint) 340if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == 343finalUserInfoEndpoint = req.RequestUri.ToString(); 391if (req.RequestUri.AbsoluteUri == "https://graph.facebook.com/v14.0/oauth/access_token") 410else if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == "https://graph.facebook.com/v14.0/me")
GoogleTests.cs (5)
1030if (req.RequestUri.AbsoluteUri == "https://oauth2.googleapis.com/token") 1049else if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == "https://www.googleapis.com/oauth2/v3/userinfo") 1094if (req.RequestUri.AbsoluteUri == "https://oauth2.googleapis.com/token") 1104else if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == "https://www.googleapis.com/oauth2/v3/userinfo") 1117throw new NotImplementedException(req.RequestUri.AbsoluteUri);
MicrosoftAccountTests.cs (4)
198if (req.RequestUri.AbsoluteUri == "https://login.microsoftonline.com/common/oauth2/v2.0/token") 208else if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == "https://graph.microsoft.com/v1.0/me") 297if (req.RequestUri.AbsoluteUri == "https://login.microsoftonline.com/common/oauth2/v2.0/token") 316else if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == "https://graph.microsoft.com/v1.0/me")
OAuthTests.cs (2)
440if (req.RequestUri.AbsoluteUri == "https://example.com/provider/token") 484if (req.RequestUri.AbsoluteUri == "https://example.com/provider/token")
OpenIdConnect\OpenIdConnectChallengeTests.cs (4)
974if (string.Equals("/tokens", request.RequestUri.AbsolutePath, StringComparison.Ordinal)) 982if (string.Equals("/user", request.RequestUri.AbsolutePath, StringComparison.Ordinal)) 986if (string.Equals("/par", request.RequestUri.AbsolutePath, StringComparison.Ordinal)) 997throw new NotImplementedException(request.RequestUri.ToString());
OpenIdConnect\OpenIdConnectEventTests.cs (3)
1393if (string.Equals("/tokens", request.RequestUri.AbsolutePath, StringComparison.Ordinal)) 1401if (string.Equals("/user", request.RequestUri.AbsolutePath, StringComparison.Ordinal)) 1406throw new NotImplementedException(request.RequestUri.ToString());
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (3)
1388if (string.Equals("/tokens", request.RequestUri.AbsolutePath, StringComparison.Ordinal)) 1396if (string.Equals("/user", request.RequestUri.AbsolutePath, StringComparison.Ordinal)) 1401throw new NotImplementedException(request.RequestUri.ToString());
OpenIdConnect\TestSettings.cs (2)
320if (request.RequestUri.AbsoluteUri.Equals("https://login.microsoftonline.com/common/.well-known/openid-configuration")) 324if (request.RequestUri.AbsoluteUri.Equals("https://login.microsoftonline.com/common/discovery/keys"))
TwitterTests.cs (10)
397if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == "https://api.twitter.com/oauth/access_token") 466if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == "https://api.twitter.com/oauth/access_token") 479if (req.RequestUri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped) == 482finalVerifyCredentialsEndpoint = req.RequestUri.ToString(); 594if (req.RequestUri.AbsoluteUri == "https://api.twitter.com/oauth/request_token") 604throw new NotImplementedException(req.RequestUri.AbsoluteUri); 609if (req.RequestUri.AbsoluteUri == "https://api.twitter.com/oauth/request_token") 619throw new NotImplementedException(req.RequestUri.AbsoluteUri); 624if (req.RequestUri.AbsoluteUri == "https://api.twitter.com/oauth/request_token") 634throw new NotImplementedException(req.RequestUri.AbsoluteUri);
Microsoft.AspNetCore.Diagnostics.Tests (1)
StatusCodeMiddlewareTest.cs (1)
68Assert.Equal(expectedQueryString, response.RequestMessage.RequestUri.Query);
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.FunctionalTests (1)
Extensions\ResponseAssert.cs (1)
33.Address(response.RequestMessage.RequestUri)
Microsoft.AspNetCore.Identity.Test (1)
RetryHandler.cs (1)
29var url = request.RequestUri;
Microsoft.AspNetCore.Mvc.FunctionalTests (3)
RazorPageModelTest.cs (1)
189var getResponse = await Client.GetAsync(request.RequestUri);
RazorPagesTest.cs (1)
1501var getResponse = await Client.GetAsync(request.RequestUri);
RazorPagesWithBasePathTest.cs (1)
755var response = await Client.GetAsync(request.RequestUri);
Microsoft.AspNetCore.Mvc.Testing (3)
Handlers\CookieContainerHandler.cs (2)
43var cookieHeader = Container.GetCookieHeader(request.RequestUri!); 56Container.SetCookies(response.RequestMessage!.RequestUri!, header);
Handlers\RedirectHandler.cs (1)
142if (!location.IsAbsoluteUri && response.RequestMessage.RequestUri is Uri requestUri)
Microsoft.AspNetCore.Server.IntegrationTesting (3)
Common\LoggingHandler.cs (3)
20_logger.LogDebug("Sending {method} {url}", request.Method, request.RequestUri); 24_logger.LogDebug("Received {statusCode} {reasonPhrase} {url}", response.StatusCode, response.ReasonPhrase, request.RequestUri); 29_logger.LogError(0, ex, "Exception while sending '{method} {url}' : {exception}", request.Method, request.RequestUri, ex);
Microsoft.AspNetCore.SignalR.Client.Tests (30)
HttpConnectionTests.cs (1)
79negotiateUrlTcs.TrySetResult(request.RequestUri.ToString());
HttpConnectionTests.Negotiate.cs (17)
75negotiateUrlTcs.TrySetResult(request.RequestUri.ToString()); 203Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 204Assert.Equal("http://fakeuri.org/?id=different-id", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 243Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 244Assert.Equal("http://fakeuri.org/?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 300Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 301Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 302Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 303Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString()); 406Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 407Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 408Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 409Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString()); 471Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 472Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 473Assert.Equal("https://another.domain.url/chat?negotiateVersion=1&id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 474Assert.Equal("https://another.domain.url/chat?negotiateVersion=1&id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString());
LongPollingTransportTests.cs (1)
694Assert.Equal(TestUri, deleteRequest.RequestUri);
ResponseUtils.cs (7)
37new UriBuilder(request.RequestUri).Path.EndsWith("/negotiate", StringComparison.Ordinal); 44(request.RequestUri.PathAndQuery.Contains("?id=") || request.RequestUri.PathAndQuery.Contains("&id=")); 50(request.RequestUri.PathAndQuery.Contains("?id=") || request.RequestUri.PathAndQuery.Contains("&id=")); 61(request.RequestUri.PathAndQuery.Contains("?id=") || request.RequestUri.PathAndQuery.Contains("&id="));
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.SpaServices.Extensions.Tests (1)
SpaProxyTests.cs (1)
59Assert.Equal(expected, forwardedRequestMessage.RequestUri.ToString());
Microsoft.AspNetCore.TestHost (5)
ClientHandler.cs (5)
116req.Scheme = request.RequestUri!.Scheme; 173req.Host = HostString.FromUriComponent(request.RequestUri); 174if (request.RequestUri.IsDefaultPort) 180req.Path = PathString.FromUriComponent(request.RequestUri); 187req.QueryString = QueryString.FromUriComponent(request.RequestUri);
Microsoft.Build.Tasks.Core (1)
DownloadFile.cs (1)
327?? Path.GetFileName(response.RequestMessage.RequestUri.LocalPath); // Otherwise attempt to get a file name from the URI
Microsoft.DotNet.Helix.Sdk (2)
AzureDevOpsTask.cs (2)
132var message = $"Request to {req.RequestUri} returned failed status {statusCodeValue} {res.ReasonPhrase}\n\n{(res.Content != null ? await res.Content.ReadAsStringAsync() : "")}"; 162Log.LogError(FailureCategory.Helix, $"Request to {req.RequestUri} returned unexpected response: {responseContent}");
Microsoft.Extensions.Http (2)
Logging\LogHelper.cs (2)
100_requestStart(logger, request.Method, GetRedactedUriString(request.RequestUri), null); 134formattedUri = GetRedactedUriString(request.RequestUri);
Microsoft.Extensions.Http.Diagnostics (11)
Http\DownstreamDependencyMetadataManager.cs (3)
46if (requestMessage.RequestUri == null) 51var hostMetadata = GetHostMetadata(requestMessage.RequestUri.Host); 52return GetRequestMetadataInternal(requestMessage.Method.Method, requestMessage.RequestUri.AbsolutePath, hostMetadata);
Logging\Internal\HttpClientLogger.cs (3)
94? request.RequestUri?.AbsolutePath 97Log.RequestReadError(_logger, ex, request.Method, request.RequestUri?.Host, pathToLog); 167Log.LoggerContextMissing(_logger, exception, requestState, request.Method, request.RequestUri?.Host);
Logging\Internal\HttpRequestReader.cs (5)
99logRecord.Host = request.RequestUri?.Host ?? TelemetryConstants.Unknown; 137if (request.RequestUri is null) 145logRecord.Path = request.RequestUri.AbsolutePath; 170logRecord.Path = _routeFormatter.Format(in routeSegments, request.RequestUri.AbsolutePath, _routeParameterRedactionMode, _defaultSensitiveParameters); 181if (_httpRouteParser.TryExtractParameters(request.RequestUri.AbsolutePath, in routeSegments, _routeParameterRedactionMode, _defaultSensitiveParameters, ref routeParams))
Microsoft.Extensions.Http.Diagnostics.Tests (4)
Logging\AcceptanceTests.cs (3)
117Assert.Equal($"{httpRequestMessage.Method} {httpRequestMessage.RequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message); 373.Which.Value.Should().Be(httpRequestMessage.RequestUri.Host); 387loggedPath.Should().Be(httpRequestMessage.RequestUri.AbsolutePath);
Logging\HttpClientLoggerTest.cs (1)
441Assert.Equal($"{httpRequestMessage.Method} {httpRequestMessage.RequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message);
Microsoft.Extensions.Http.Polly.Tests (4)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (4)
82.AddPolicyHandler((req) => req.RequestUri.AbsolutePath == "/" ? RetryPolicy : NoOpPolicy) 120.AddPolicyHandler((req) => req.RequestUri.AbsolutePath == "/" ? RetryPolicy : NoOpPolicy) 202return req.RequestUri.AbsolutePath == "/" ? 345return r.RequestUri.Host;
Microsoft.Extensions.Http.Resilience (4)
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (1)
107requestMessage.RequestUri = requestMessage.RequestUri!.ReplaceHost(route);
Internal\RequestMessageSnapshot.cs (1)
83_requestUri = request.RequestUri;
Resilience\Internal\ByAuthorityPipelineKeyProvider.cs (1)
16var url = requestMessage.RequestUri ?? throw new InvalidOperationException("The request message must have a URL specified.");
Routing\Internal\RoutingResilienceStrategy.cs (1)
53request.RequestUri = request.RequestUri!.ReplaceHost(route!);
Microsoft.Extensions.Http.Resilience.Tests (7)
Hedging\HedgingTests.cs (1)
350Requests.Add(request.RequestUri!.ToString());
Hedging\StandardHedgingTests.cs (2)
354if (request.RequestUri?.Host == failingEndpoint) 368if (request.RequestUri?.Host == failingEndpoint)
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (2)
73.SelectPipelineBy(_ => r => r.RequestUri!.GetLeftPart(UriPartial.Scheme)).PipelineName; 79.SelectPipelineBy(_ => r => r.RequestUri!.GetLeftPart(UriPartial.Scheme)).PipelineName;
Resilience\RequestMessageSnapshotTests.cs (2)
80Assert.Equal(initialRequest.RequestUri, cloned.RequestUri);
Microsoft.Extensions.ServiceDiscovery (5)
Http\HttpServiceEndpointResolver.cs (3)
31/// <exception cref="InvalidOperationException">The request had no <see cref="HttpRequestMessage.RequestUri"/> set or a suitable endpoint could not be found.</exception> 35if (request.RequestUri is null) 42var key = request.RequestUri.GetLeftPart(UriPartial.Authority);
Http\ResolvingHttpClientHandler.cs (1)
19var originalUri = request.RequestUri;
Http\ResolvingHttpDelegatingHandler.cs (1)
43var originalUri = request.RequestUri;
System.Net.Http (49)
System\Net\Http\DiagnosticsHandler.cs (4)
128if (request.RequestUri is Uri requestUri && requestUri.IsAbsoluteUri) 255[DynamicDependency(nameof(HttpRequestMessage.RequestUri), typeof(HttpRequestMessage))] 288[DynamicDependency(nameof(HttpRequestMessage.RequestUri), typeof(HttpRequestMessage))] 309[DynamicDependency(nameof(HttpRequestMessage.RequestUri), typeof(HttpRequestMessage))]
System\Net\Http\HttpClient.cs (4)
744if ((request.RequestUri == null) && (_baseAddress == null)) 748if (request.RequestUri == null) 755if (!request.RequestUri.IsAbsoluteUri) 763requestUri = new Uri(_baseAddress, request.RequestUri);
System\Net\Http\HttpMessageInvoker.cs (1)
102request.RequestUri is Uri requestUri &&
System\Net\Http\HttpTelemetry.cs (6)
55Debug.Assert(request.RequestUri != null && request.RequestUri.IsAbsoluteUri); 58request.RequestUri.Scheme, 59request.RequestUri.IdnHost, 60request.RequestUri.Port, 61request.RequestUri.PathAndQuery,
System\Net\Http\Metrics\MetricsHandler.cs (1)
139if (request.RequestUri is Uri requestUri && requestUri.IsAbsoluteUri)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (3)
196NetEventSource.AuthenticationError(request.RequestUri, $"Unable to find 'Digest' authentication token when authenticating with {(isProxyAuth ? "proxy" : "server")}"); 355Debug.Assert(request.RequestUri != null); 356return SendWithAuthAsync(request, request.RequestUri, async, credentials, preAuthenticate, isProxyAuth: false, doRequestAuth: true, pool, cancellationToken);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (3)
108Debug.Assert(request.RequestUri != null); 110sb.AppendKeyValue(Uri, request.RequestUri.PathAndQuery); 147string a2 = request.Method.Method + ":" + request.RequestUri.PathAndQuery;
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (2)
242Debug.Assert(request.RequestUri != null); 243return SendWithNtAuthAsync(request, request.RequestUri, async, credentials, impersonationLevel, isProxyAuth: false, connection, connectionPool, cancellationToken);
System\Net\Http\SocketsHttpHandler\CookieHelper.cs (2)
19Debug.Assert(response.RequestMessage != null && response.RequestMessage.RequestUri != null); 21Uri requestUri = response.RequestMessage.RequestUri;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (3)
1500Debug.Assert(request.RequestUri != null); 1501string pathAndQuery = request.RequestUri.PathAndQuery; 1535string cookiesFromContainer = _pool.Settings._cookieContainer!.GetCookieHeader(request.RequestUri);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (3)
635Debug.Assert(request.RequestUri != null); 636string pathAndQuery = request.RequestUri.PathAndQuery; 664string cookiesFromContainer = _connection.Pool.Settings._cookieContainer!.GetCookieHeader(request.RequestUri);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (6)
311Debug.Assert(request.RequestUri is not null); 332Debug.Assert(request.RequestUri.Scheme == Uri.UriSchemeHttp); 334WriteHost(request.RequestUri); 337WriteAsciiString(request.RequestUri.PathAndQuery); 358WriteHost(request.RequestUri); 367cookiesFromContainer = _pool.Settings._cookieContainer!.GetCookieHeader(request.RequestUri);
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (6)
258Uri? uri = request.RequestUri; 385Debug.Assert(request.RequestUri != null); 386if (!_proxy.IsBypassed(request.RequestUri)) 390MultiProxy multiProxy = multiWebProxy.GetMultiProxy(request.RequestUri); 399proxyUri = _proxy.GetProxy(request.RequestUri); 407if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, $"Exception from {_proxy.GetType().Name}.GetProxy({request.RequestUri}): {ex}");
System\Net\Http\SocketsHttpHandler\RedirectHandler.cs (4)
34Debug.Assert(request.RequestUri != null); 35while ((redirectUri = GetUriForRedirect(request.RequestUri, response)) != null) 45TraceError($"Exceeded max number of redirects. Redirect from {request.RequestUri} to {redirectUri} blocked.", request.GetHashCode()); 62Trace($"Redirecting from {request.RequestUri} to {redirectUri} in response to status code {(int)response.StatusCode} '{response.StatusCode}'.", request.GetHashCode());
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
672Uri? requestUri = request.RequestUri;
System.Net.Requests (1)
System\Net\HttpWebResponse.cs (1)
237return _httpResponseMessage.RequestMessage!.RequestUri!;
Templates.Mvc.Tests (1)
BlazorTemplateTest.cs (1)
112Assert.Equal("/Account/Login?ReturnUrl=%2Fauth", response.RequestMessage.RequestUri.PathAndQuery);