1 type derived from HttpRequest
Microsoft.AspNetCore.Http (1)
Internal\DefaultHttpRequest.cs (1)
10internal sealed class DefaultHttpRequest : HttpRequest
412 references to HttpRequest
Aspire.Dashboard.Tests (1)
Integration\MockOpenIdAuthority.cs (1)
46(HttpRequest request, [FromHeader] string host) =>
AzureFunctionsEndToEnd.Functions (1)
MyHttpTrigger.cs (1)
28public IResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequest req)
Certificate.Optional.Sample (1)
Startup.cs (1)
23var request = context.Request;
FormatterWebSite (1)
StringInputFormatter.cs (1)
22var request = context.HttpContext.Request;
HttpAbstractions.SampleApp (1)
Program.cs (1)
14var request = context.Request;
InMemory.FunctionalTests (26)
ChunkedRequestTests.cs (13)
23var request = httpContext.Request; 40var request = httpContext.Request; 59var request = httpContext.Request; 177var request = httpContext.Request; 233var request = httpContext.Request; 361var request = httpContext.Request; 583var request = httpContext.Request; 664var request = httpContext.Request; 708var request = httpContext.Request; 914var request = httpContext.Request; 970var request = httpContext.Request; 1019var request = httpContext.Request; 1083var request = httpContext.Request;
HttpsConnectionMiddlewareTests.cs (1)
1486var request = httpContext.Request;
KestrelMetricsTests.cs (1)
919var request = httpContext.Request;
RequestTests.cs (4)
1906var request = httpContext.Request; 1956var request = httpContext.Request; 2000var request = httpContext.Request; 2041var request = httpContext.Request;
ResponseTests.cs (2)
2327var request = httpContext.Request; 2376var request = httpContext.Request;
src\Servers\Kestrel\shared\test\TestApp.cs (4)
16var request = httpContext.Request; 29var request = httpContext.Request; 46var request = httpContext.Request; 63var request = httpContext.Request;
TestTransport\RequestExtensions.cs (1)
10internal static bool? CanHaveBody(this HttpRequest request)
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Helpers.cs (1)
11internal static bool? CanHaveBody(this HttpRequest request)
Microsoft.AspNetCore.Authentication (3)
AuthenticationHandler.cs (2)
36/// Gets the <see cref="HttpRequest"/> associated with the current request. 38protected HttpRequest Request
Events\BaseContext.cs (1)
48public HttpRequest Request => HttpContext.Request;
Microsoft.AspNetCore.Authentication.Cookies (1)
CookieAuthenticationEvents.cs (1)
105private static bool IsAjaxRequest(HttpRequest request)
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectHandler.cs (2)
1171/// Searches <see cref="HttpRequest.Cookies"/> for a matching nonce. 1175/// <remarks>Examine <see cref="IRequestCookieCollection.Keys"/> of <see cref="HttpRequest.Cookies"/> that start with the prefix: 'OpenIdConnectAuthenticationDefaults.Nonce'.
Microsoft.AspNetCore.Authentication.Test (12)
CertificateTests.cs (1)
820var request = context.Request;
CookieTests.cs (1)
1817var req = context.Request;
DynamicSchemeTests.cs (1)
139var req = context.Request;
GoogleTests.cs (5)
168var req = context.Request; 220var req = context.Request; 272var req = context.Request; 349var req = context.Request; 1154var req = context.Request;
MicrosoftAccountTests.cs (1)
365var req = context.Request;
OpenIdConnect\TestServerBuilder.cs (1)
72var req = context.Request;
PolicyTests.cs (1)
472var req = context.Request;
TwitterTests.cs (1)
545var req = context.Request;
Microsoft.AspNetCore.Components.Endpoints (4)
Rendering\EndpointHtmlRenderer.cs (2)
203private static string GetFullUri(HttpRequest request) 213private static string GetContextBaseUri(HttpRequest request)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
227private static bool IsPossibleExternalDestination(HttpRequest request, string destinationUrl)
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
305private static bool IsProgressivelyEnhancedNavigation(HttpRequest request)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
TargetPickerUi.cs (2)
114var request = context.Request; 267var request = context.Request;
Microsoft.AspNetCore.Diagnostics (4)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
362var request = context.Request;
src\Shared\Diagnostics\BaseView.cs (1)
30protected HttpRequest Request { get; private set; } = default!;
src\Shared\RazorViews\BaseView.cs (1)
33protected HttpRequest Request { get; private set; } = default!;
WelcomePage\WelcomePageMiddleware.cs (1)
40HttpRequest request = context.Request;
Microsoft.AspNetCore.Diagnostics.Abstractions (3)
IStatusCodeReExecuteFeature.cs (3)
17/// The <see cref="HttpRequest.PathBase"/> of the original request. 22/// The <see cref="HttpRequest.Path"/> of the original request. 27/// The <see cref="HttpRequest.QueryString"/> of the original request.
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
src\Shared\Diagnostics\BaseView.cs (1)
30protected HttpRequest Request { get; private set; } = default!;
src\Shared\RazorViews\BaseView.cs (1)
33protected HttpRequest Request { get; private set; } = default!;
Microsoft.AspNetCore.Diagnostics.Middleware (6)
Logging\HttpLoggingRedactionInterceptor.cs (1)
67var request = context.Request;
Logging\HttpUtilityExtensions.cs (2)
34/// <param name="request"><see cref="HttpRequest"/> object.</param> 36public static string GetRoute(this HttpRequest request)
Logging\IIncomingHttpRouteUtility.cs (1)
22IReadOnlyDictionary<string, DataClassification> GetSensitiveParameters(string httpRoute, HttpRequest request, IReadOnlyDictionary<string, DataClassification> defaultSensitiveParameters);
Logging\IncomingHttpRouteUtility.cs (1)
24public IReadOnlyDictionary<string, DataClassification> GetSensitiveParameters(string httpRoute, HttpRequest request, IReadOnlyDictionary<string, DataClassification> defaultSensitiveParameters)
Logging\RequestHeadersLogEnricher.cs (1)
56var request = _httpContextAccessor.HttpContext.Request;
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (29)
Logging\HttpUtilityExtensionsTests.cs (6)
47Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 58Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 76Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>();
Logging\IncomingHttpRouteUtilityTests.cs (22)
51Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 89Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 129Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 171Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 213Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 260Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 301Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 349Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 394Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 432Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>(); 455Mock<HttpRequest> mockHttpRequest = new Mock<HttpRequest>();
Logging\RequestHeadersEnricherTests.cs (1)
233httpContextMock.SetupGet(c => c.Request).Returns((HttpRequest)null!);
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonRequestHelpers.cs (1)
28public static bool HasJsonContentType(HttpRequest request, out StringSegment charset)
Microsoft.AspNetCore.HeaderParsing (6)
HeaderParsingHttpRequestExtensions.cs (6)
19/// <param name="request">The <see cref="HttpRequest"/> instance.</param> 21public static HeaderParsingFeature GetHeaderParsing(this HttpRequest request) 41/// <param name="request">The <see cref="HttpRequest"/> instance.</param> 45public static bool TryGetHeaderValue<T>(this HttpRequest request, HeaderKey<T> header, [NotNullWhen(true)] out T? value) 57/// <param name="request">The <see cref="HttpRequest"/> instance.</param> 62public static bool TryGetHeaderValue<T>(this HttpRequest request, HeaderKey<T> header, [NotNullWhen(true)] out T? value, out ParsingResult result)
Microsoft.AspNetCore.Hosting (28)
Internal\HostingApplicationDiagnostics.cs (22)
336[DynamicDependency(nameof(HttpRequest.Path), typeof(HttpRequest))] 337[DynamicDependency(nameof(HttpRequest.Method), typeof(HttpRequest))] 357[DynamicDependency(nameof(HttpRequest.Path), typeof(HttpRequest))] 358[DynamicDependency(nameof(HttpRequest.Method), typeof(HttpRequest))] 445[DynamicDependency(nameof(HttpRequest.Scheme), typeof(HttpRequest))] 446[DynamicDependency(nameof(HttpRequest.Host), typeof(HttpRequest))] 447[DynamicDependency(nameof(HttpRequest.PathBase), typeof(HttpRequest))] 448[DynamicDependency(nameof(HttpRequest.QueryString), typeof(HttpRequest))] 449[DynamicDependency(nameof(HttpRequest.Path), typeof(HttpRequest))] 450[DynamicDependency(nameof(HttpRequest.Method), typeof(HttpRequest))] 451[DynamicDependency(nameof(HttpRequest.Headers), typeof(HttpRequest))]
Internal\HostingRequestFinishedLog.cs (2)
30var request = _context.HttpContext.Request; 64var request = _context.HttpContext.Request;
Internal\HostingRequestStartingLog.cs (2)
17private readonly HttpRequest _request; 47var request = _request;
Internal\HostingRequestUnhandledLog.cs (1)
42var request = _httpContext.Request;
src\Shared\RazorViews\BaseView.cs (1)
33protected HttpRequest Request { get; private set; } = default!;
Microsoft.AspNetCore.Hosting.Tests (2)
Internal\HostingRequestStartLogTests.cs (1)
16var mockRequest = new Mock<HttpRequest>();
WebHostTests.cs (1)
942HttpRequest capturedRequest = null;
Microsoft.AspNetCore.Http (26)
DefaultHttpContext.cs (1)
142public override HttpRequest Request => _request;
Extensions\HttpRequestRewindExtensions.cs (13)
7/// Extension methods for enabling buffering in an <see cref="HttpRequest"/>. 12/// Ensure the <paramref name="request"/> <see cref="HttpRequest.Body"/> can be read multiple times. Normally 15/// <param name="request">The <see cref="HttpRequest"/> to prepare.</param> 21public static void EnableBuffering(this HttpRequest request) 27/// Ensure the <paramref name="request"/> <see cref="HttpRequest.Body"/> can be read multiple times. Normally 31/// <param name="request">The <see cref="HttpRequest"/> to prepare.</param> 41public static void EnableBuffering(this HttpRequest request, int bufferThreshold) 47/// Ensure the <paramref name="request"/> <see cref="HttpRequest.Body"/> can be read multiple times. Normally 50/// <param name="request">The <see cref="HttpRequest"/> to prepare.</param> 60public static void EnableBuffering(this HttpRequest request, long bufferLimit) 66/// Ensure the <paramref name="request"/> <see cref="HttpRequest.Body"/> can be read multiple times. Normally 70/// <param name="request">The <see cref="HttpRequest"/> to prepare.</param> 84public static void EnableBuffering(this HttpRequest request, int bufferThreshold, long bufferLimit)
Features\FormFeature.cs (6)
19private readonly HttpRequest? _request; 42/// <param name="request">The <see cref="HttpRequest"/>.</param> 43public FormFeature(HttpRequest request) 51/// <param name="request">The <see cref="HttpRequest"/>.</param> 53public FormFeature(HttpRequest request, FormOptions options) 58internal FormFeature(HttpRequest request, FormOptions options, Endpoint? endpoint)
Internal\BufferingHelper.cs (2)
13public static HttpRequest EnableRewind(this HttpRequest request, int bufferThreshold = DefaultBufferThreshold, long? bufferLimit = null)
RequestFormReaderExtensions.cs (2)
9/// Extension for <see cref="HttpRequest"/>. 21public static Task<IFormCollection> ReadFormAsync(this HttpRequest request, FormOptions options,
src\Shared\Debugger\HttpContextDebugFormatter.cs (2)
31public static string RequestToString(HttpRequest request) 89private static void GetRequestUrl(StringBuilder sb, HttpRequest request, bool includeQueryString)
Microsoft.AspNetCore.Http.Abstractions (12)
Extensions\RequestTrailerExtensions.cs (4)
20public static StringValues GetDeclaredTrailers(this HttpRequest request) 30public static bool SupportsTrailers(this HttpRequest request) 41public static bool CheckTrailersAvailable(this HttpRequest request) 53public static StringValues GetTrailer(this HttpRequest request, string trailerName)
HttpContext.cs (3)
25/// Gets the <see cref="HttpRequest"/> object for this request. 27public abstract HttpRequest Request { get; } 91public HttpRequest Request => _context.Request;
HttpRequest.cs (2)
160private sealed class HttpRequestDebugView(HttpRequest request) 162private readonly HttpRequest _request = request;
Metadata\IFromRouteMetadata.cs (1)
12/// The <see cref="HttpRequest.RouteValues"/> name.
src\Shared\Debugger\HttpContextDebugFormatter.cs (2)
31public static string RequestToString(HttpRequest request) 89private static void GetRequestUrl(StringBuilder sb, HttpRequest request, bool includeQueryString)
Microsoft.AspNetCore.Http.Extensions (30)
HeaderDictionaryTypeExtensions.cs (2)
23/// <param name="request">The <see cref="HttpRequest"/>.</param> 25public static RequestHeaders GetTypedHeaders(this HttpRequest request)
HttpRequestJsonExtensions.cs (10)
36this HttpRequest request, 57this HttpRequest request, 97this HttpRequest request, 135this HttpRequest request, 171this HttpRequest request, 193this HttpRequest request, 236this HttpRequest request, 270public static bool HasJsonContentType(this HttpRequest request) 275private static bool HasJsonContentType(this HttpRequest request, out StringSegment charset) 310private static void ThrowContentTypeError(HttpRequest request)
HttpRequestMultipartExtensions.cs (2)
16/// <param name="request">The <see cref="HttpRequest"/>.</param> 18public static string GetMultipartBoundary(this HttpRequest request)
RequestDelegateFactory.cs (13)
96private static readonly MemberExpression RouteValuesExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.RouteValues))!); 97private static readonly MemberExpression QueryExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.Query))!); 98private static readonly MemberExpression HeadersExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.Headers))!); 99private static readonly MemberExpression FormExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.Form))!); 100private static readonly MemberExpression RequestStreamExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.Body))!); 101private static readonly MemberExpression RequestPipeReaderExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.BodyReader))!); 830else if (parameter.ParameterType == typeof(HttpRequest))
UriHelper.cs (3)
184public static string GetEncodedUrl(this HttpRequest request) 193public static string GetEncodedPathAndQuery(this HttpRequest request) 205public static string GetDisplayUrl(this HttpRequest request)
Microsoft.AspNetCore.Http.Extensions.Tests (6)
HttpRequestJsonExtensionsTests.cs (1)
28var request = new DefaultHttpContext().Request;
RequestDelegateFactoryTests.cs (2)
1260HttpRequest? httpRequestArgument = null; 1262void TestAction(HttpRequest httpRequest)
RequestDelegateGenerator\SharedTypes.cs (1)
713HttpRequest Request,
UriHelperTests.cs (2)
86var request = new DefaultHttpContext().Request; 101var request = new DefaultHttpContext().Request;
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
713HttpRequest Request,
Microsoft.AspNetCore.Http.Results (1)
src\Shared\ResultsHelpers\FileResultHelper.cs (1)
99var request = httpContext.Request;
Microsoft.AspNetCore.Http.Tests (17)
Internal\DefaultHttpRequestTests.cs (17)
21var request = GetRequestWithContentLength(value.ToString(CultureInfo.InvariantCulture)); 31var request = GetRequestWithContentLength(contentLength: null); 45var request = GetRequestWithContentLength(contentLength); 55var request = GetRequestWithContentType(contentType: null); 72var request = CreateRequest(headers); 92var request = CreateRequest(headers); 109var request = CreateRequest(headers); 121var request = new DefaultHttpContext().Request; 137var request = new DefaultHttpContext().Request; 166var request = new DefaultHttpContext().Request; 200var request = context.Request; 346private static HttpRequest CreateRequest(IHeaderDictionary headers) 353private static HttpRequest GetRequestWithContentLength(string contentLength = null) 358private static HttpRequest GetRequestWithContentType(string contentType = null) 363private static HttpRequest GetRequestWithAcceptHeader(string acceptHeader = null) 368private static HttpRequest GetRequestWithAcceptCharsetHeader(string acceptCharset = null) 373private static HttpRequest GetRequestWithHeader(string headerName, string headerValue)
Microsoft.AspNetCore.HttpLogging (16)
HttpLoggingFields.cs (12)
22/// Flag for logging the HTTP Request Path, which includes both the <see cref="HttpRequest.Path"/> 23/// and <see cref="HttpRequest.PathBase"/>. 33/// Flag for logging the HTTP Request <see cref="HttpRequest.QueryString"/>. 47/// Flag for logging the HTTP Request <see cref="HttpRequest.Protocol"/>. 56/// Flag for logging the HTTP Request <see cref="HttpRequest.Method"/>. 65/// Flag for logging the HTTP Request <see cref="HttpRequest.Scheme"/>. 83/// Flag for logging the HTTP Request <see cref="HttpRequest.Headers"/>. 125/// Flag for logging the HTTP Request <see cref="HttpRequest.Body"/>. 149/// The HTTP Request <see cref="HttpRequest.QueryString"/> is not included with this flag as it may contain private information. 159/// The HTTP Request <see cref="HttpRequest.QueryString"/> is not included with this flag as it may contain private information. 177/// The HTTP Request <see cref="HttpRequest.QueryString"/> is not included with this flag as it may contain private information. 198/// The HTTP Request <see cref="HttpRequest.QueryString"/> is not included with this flag as it may contain private information.
HttpLoggingMiddleware.cs (1)
109var request = context.Request;
W3CLoggingFields.cs (2)
136/// Flag for logging properties that are part of the <see cref="HttpRequest.Headers"/> 142/// Flag for logging properties that are part of the <see cref="HttpRequest"/>
W3CLoggingMiddleware.cs (1)
118var request = context.Request;
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
127var request = context.Request;
Microsoft.AspNetCore.HttpsPolicy (1)
HttpsRedirectionMiddleware.cs (1)
101var request = context.Request;
Microsoft.AspNetCore.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
300var req = context.Request;
Microsoft.AspNetCore.Localization (5)
IRequestCultureProvider.cs (1)
9/// Represents a provider for determining the culture information of an <see cref="HttpRequest"/>.
QueryStringRequestCultureProvider.cs (1)
31var request = httpContext.Request;
RequestCulture.cs (1)
9/// Details about the culture for an <see cref="Http.HttpRequest"/>.
RequestCultureProvider.cs (1)
10/// An abstract base class provider for determining the culture information of an <see cref="HttpRequest"/>.
RequestLocalizationMiddleware.cs (1)
15/// Enables automatic setting of the culture for <see cref="HttpRequest"/>s based on information
Microsoft.AspNetCore.Mvc.Abstractions (1)
IUrlHelper.cs (1)
103/// This method uses the value of <see cref="HttpRequest.Host"/> to populate the host section of the generated URI.
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointMetadataApiDescriptionProvider.cs (1)
279parameterType == typeof(HttpRequest) ||
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
585Assert.Empty(GetApiDescription((HttpRequest request) => { }).ParameterDescriptions);
Microsoft.AspNetCore.Mvc.Core (36)
AcceptedAtActionResult.cs (1)
69var request = context.HttpContext.Request;
ActionConstraints\HttpMethodActionConstraint.cs (1)
68var request = context.RouteContext.HttpContext.Request;
ControllerBase.cs (2)
40/// Gets the <see cref="HttpRequest"/> for the executing action. 42public HttpRequest Request => HttpContext?.Request!;
CreatedAtActionResult.cs (1)
69var request = context.HttpContext.Request;
Formatters\TextOutputFormatter.cs (1)
172var request = context.HttpContext.Request;
FromRouteAttribute.cs (1)
34/// The <see cref="HttpRequest.RouteValues"/> name.
Infrastructure\DefaultOutputFormatterSelector.cs (2)
72var request = context.HttpContext.Request; 149private List<MediaTypeSegmentWithQuality> GetAcceptableMediaTypes(HttpRequest request)
Infrastructure\IHttpRequestStreamReaderFactory.cs (2)
11/// Creates <see cref="TextReader"/> instances for reading from <see cref="Http.HttpRequest.Body"/>. 18/// <param name="stream">The <see cref="Stream"/>, usually <see cref="Http.HttpRequest.Body"/>.</param>
ModelBinding\Binders\FormCollectionModelBinder.cs (1)
40var request = bindingContext.HttpContext.Request;
ModelBinding\Binders\FormFileModelBinder.cs (1)
140var request = bindingContext.HttpContext.Request;
ModelBinding\Binders\HeaderModelBinder.cs (3)
62var request = bindingContext.HttpContext.Request; 102var request = bindingContext.HttpContext.Request; 125var request = bindingContext.HttpContext.Request;
ModelBinding\FormFileValueProviderFactory.cs (2)
21var request = context.ActionContext.HttpContext.Request; 31private static async Task AddValueProviderAsync(ValueProviderFactoryContext context, HttpRequest request)
ModelBinding\FormValueProviderFactory.cs (2)
22var request = context.ActionContext.HttpContext.Request; 34var request = context.ActionContext.HttpContext.Request;
ModelBinding\JQueryFormValueProviderFactory.cs (2)
22var request = context.ActionContext.HttpContext.Request; 34var request = context.ActionContext.HttpContext.Request;
RequestFormLimitsAttribute.cs (1)
13/// Sets the specified limits to the <see cref="HttpRequest.Form"/>.
RequireHttpsAttribute.cs (1)
74var request = filterContext.HttpContext.Request;
Routing\ControllerLinkGeneratorExtensions.cs (4)
31/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 111/// The URI scheme, applied to the resulting URI. Optional. If not provided, the value of <see cref="HttpRequest.Scheme"/> will be used. 114/// The URI host/authority, applied to the resulting URI. Optional. If not provided, the value <see cref="HttpRequest.Host"/> will be used. 117/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
Routing\PageLinkGeneratorExtensions.cs (4)
30/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 112/// The URI scheme, applied to the resulting URI. Optional. If not provided, the value of <see cref="HttpRequest.Scheme"/> will be used. 115/// The URI host/authority, applied to the resulting URI. Optional. If not provided, the value <see cref="HttpRequest.Host"/> will be used. 118/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
src\Shared\ResultsHelpers\FileResultHelper.cs (1)
99var request = httpContext.Request;
UrlHelperExtensions.cs (3)
106/// This method uses the value of <see cref="HttpRequest.Host"/> to populate the host section of the generated URI. 257/// This method uses the value of <see cref="HttpRequest.Host"/> to populate the host section of the generated URI. 405/// This method uses the value of <see cref="HttpRequest.Host"/> to populate the host section of the generated URI.
Microsoft.AspNetCore.Mvc.Core.Test (5)
ControllerBaseTest.cs (3)
3013var request = Mock.Of<HttpRequest>(); 3021var innerRequest = controller.Request;
Formatters\TextOutputFormatterTests.cs (1)
42var httpRequest = new DefaultHttpContext().Request;
Infrastructure\ActionSelectorTest.cs (1)
1106var request = new Mock<HttpRequest>(MockBehavior.Strict);
Microsoft.AspNetCore.Mvc.Cors (2)
CorsAuthorizationFilter.cs (1)
75var request = httpContext.Request;
CorsHttpMethodActionConstraint.cs (1)
30var request = context.RouteContext.HttpContext.Request;
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
XmlDataContractSerializerInputFormatter.cs (1)
104var request = context.HttpContext.Request;
XmlSerializerInputFormatter.cs (1)
88var request = context.HttpContext.Request;
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (6)
XmlDataContractSerializerInputFormatterTest.cs (1)
738var request = new Mock<HttpRequest>();
XmlDataContractSerializerOutputFormatterTest.cs (2)
803var request = httpContext.Request; 831var request = context.HttpContext.Request;
XmlSerializerInputFormatterTest.cs (1)
674var request = new Mock<HttpRequest>();
XmlSerializerOutputFormatterTest.cs (2)
585var request = httpContext.Request; 621var request = context.HttpContext.Request;
Microsoft.AspNetCore.Mvc.IntegrationTests (19)
BindingSourceMetadataProviderIntegrationTest.cs (1)
121private void UpdateRequest(HttpRequest request, string data, string name)
ComplexRecordIntegrationTest.cs (2)
4203private static void SetJsonBodyContent(HttpRequest request, string content) 4210private static void SetFormFileBodyContent(HttpRequest request, string content, string name)
ComplexTypeIntegrationTestBase.cs (3)
3702private static void SetJsonBodyContent(HttpRequest request, string content) 3709private static void SetFormFileBodyContent(HttpRequest request, string content, string name) 3764Action<HttpRequest> updateRequest = null,
ComplexTypeModelBinderIntegrationTest.cs (1)
16Action<HttpRequest> updateRequest = null,
DictionaryModelBinderIntegrationTest.cs (4)
217public static TheoryData<Action<HttpRequest>> ThreeEntryTestData 282return new TheoryData<Action<HttpRequest>> 328public async Task DictionaryModelBinder_Binds3EntriesOfSimpleType(Action<HttpRequest> updateRequest) 363Action<HttpRequest> updateRequest)
FormCollectionModelBindingIntegrationTest.cs (1)
156private void UpdateRequest(HttpRequest request, string data, string name)
FormFileModelBindingIntegrationTest.cs (2)
1250private void UpdateRequest(HttpRequest request, string data, string name) 1260private void AddFormFile(HttpRequest request, string data, string name)
HeaderModelBinderIntegrationTest.cs (2)
275void action(HttpRequest r) => r.Headers.Add("CustomParameter", new[] { expectedAttemptedValue }); 436Action<HttpRequest> updateRequest = null,
ModelBindingTestHelper.cs (2)
22Action<HttpRequest> updateRequest = null, 148Action<HttpRequest> updateRequest = null,
TryUpdateModelIntegrationTest.cs (1)
1273private void UpdateRequest(HttpRequest request, string data, string name)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonInputFormatter.cs (1)
102var request = httpContext.Request;
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
NewtonsoftJsonPatchInputFormatterTest.cs (1)
258var request = new Mock<HttpRequest>();
Microsoft.AspNetCore.Mvc.RazorPages (4)
PageBase.cs (2)
45/// Gets the <see cref="HttpRequest"/>. 47public HttpRequest Request => HttpContext?.Request!;
PageModel.cs (2)
64/// Gets the <see cref="HttpRequest"/>. 66public HttpRequest Request => HttpContext?.Request!;
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Cache\CacheTagKey.cs (1)
82var request = httpContext.Request;
GlobbingUrlBuilder.cs (1)
55/// The base path of the current request (i.e. <see cref="HttpRequest.PathBase"/>).
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
DefaultHtmlGenerator.cs (1)
281var request = viewContext.HttpContext.Request;
ViewComponent.cs (2)
37/// Gets the <see cref="HttpRequest"/>. 39public HttpRequest Request => ViewContext?.HttpContext?.Request!;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Rendering\HtmlHelperFormTest.cs (2)
135var request = htmlHelper.ViewContext.HttpContext.Request; 185var request = htmlHelper.ViewContext.HttpContext.Request;
Microsoft.AspNetCore.OpenApi (1)
Services\OpenApiGenerator.cs (1)
425parameter.ParameterType == typeof(HttpRequest) ||
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiGeneratorTests.cs (1)
415Assert.Empty(GetOpenApiOperation((HttpRequest request) => { }).Parameters);
Microsoft.AspNetCore.ResponseCaching (3)
ResponseCachingKeyProvider.cs (2)
41var request = context.HttpContext.Request; 90var request = context.HttpContext.Request;
ResponseCachingPolicyProvider.cs (1)
14var request = context.HttpContext.Request;
Microsoft.AspNetCore.Rewrite (8)
RedirectRule.cs (1)
29var request = context.HttpContext.Request;
RedirectToHttpsRule.cs (1)
32var req = context.HttpContext.Request;
RedirectToNonWwwRule.cs (1)
36var request = context.HttpContext.Request;
RedirectToWwwHelper.cs (2)
13public static bool IsHostInDomains(HttpRequest request, string[]? domains) 44var request = context.HttpContext.Request;
RedirectToWwwRule.cs (1)
36var req = context.HttpContext.Request;
RewriteRule.cs (1)
43var request = context.HttpContext.Request;
UrlActions\RewriteAction.cs (1)
48var request = context.HttpContext.Request;
Microsoft.AspNetCore.Routing (23)
LinkGeneratorEndpointNameAddressExtensions.cs (8)
23/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 63/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 159/// The URI scheme, applied to the resulting URI. Optional. If not provided, the value of <see cref="HttpRequest.Scheme"/> will be used. 162/// The URI host/authority, applied to the resulting URI. Optional. If not provided, the value <see cref="HttpRequest.Host"/> will be used. 166/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 218/// The URI scheme, applied to the resulting URI. Optional. If not provided, the value of <see cref="HttpRequest.Scheme"/> will be used. 221/// The URI host/authority, applied to the resulting URI. Optional. If not provided, the value <see cref="HttpRequest.Host"/> will be used. 225/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
LinkGeneratorRouteValuesAddressExtensions.cs (8)
23/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 63/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 159/// The URI scheme, applied to the resulting URI. Optional. If not provided, the value of <see cref="HttpRequest.Scheme"/> will be used. 162/// The URI host/authority, applied to the resulting URI. Optional. If not provided, the value <see cref="HttpRequest.Host"/> will be used. 166/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 218/// The URI scheme, applied to the resulting URI. Optional. If not provided, the value of <see cref="HttpRequest.Scheme"/> will be used. 221/// The URI host/authority, applied to the resulting URI. Optional. If not provided, the value <see cref="HttpRequest.Host"/> will be used. 225/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
Matching\EndpointSelector.cs (1)
24/// and setting <see cref="HttpRequest.RouteValues"/> once an endpoint is selected.
Matching\IEndpointSelectorPolicy.cs (1)
42/// and setting <see cref="HttpRequest.RouteValues"/> to an
RequestDelegateRouteBuilderExtensions.cs (5)
91Func<HttpRequest, HttpResponse, RouteData, Task> handler) 133Func<HttpRequest, HttpResponse, RouteData, Task> handler) 175Func<HttpRequest, HttpResponse, RouteData, Task> handler) 217Func<HttpRequest, HttpResponse, RouteData, Task> handler) 235Func<HttpRequest, HttpResponse, RouteData, Task> handler)
Microsoft.AspNetCore.Routing.Abstractions (4)
LinkGenerator.cs (4)
37/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used. 85/// The URI scheme, applied to the resulting URI. Optional. If not provided, the value of <see cref="HttpRequest.Scheme"/> will be used. 88/// The URI host/authority, applied to the resulting URI. Optional. If not provided, the value <see cref="HttpRequest.Host"/> will be used. 92/// An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of <see cref="HttpRequest.PathBase"/> will be used.
Microsoft.AspNetCore.Routing.Tests (4)
RouteCollectionTest.cs (2)
598var request = new Mock<HttpRequest>(MockBehavior.Strict); 656var request = new Mock<HttpRequest>(MockBehavior.Strict);
RouteTest.cs (1)
588var request = new Mock<HttpRequest>(MockBehavior.Strict);
Tree\TreeRouterTest.cs (1)
1986var request = new Mock<HttpRequest>(MockBehavior.Strict);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
RequestBodyTests.cs (1)
244static void CheckHeadersCount(string headerName, int expectedCount, HttpRequest request)
Utilities.cs (1)
172internal static bool? CanHaveBody(this HttpRequest request)
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\RazorViews\BaseView.cs (1)
33protected HttpRequest Request { get; private set; } = default!;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
src\Servers\Kestrel\shared\test\TestApp.cs (4)
16var request = httpContext.Request; 29var request = httpContext.Request; 46var request = httpContext.Request; 63var request = httpContext.Request;
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
131var request = context.Request;
Microsoft.AspNetCore.StaticAssets (1)
StaticAssetsInvoker.cs (1)
255private readonly HttpRequest _request = null!;
Microsoft.AspNetCore.StaticFiles (2)
Helpers.cs (1)
44var request = context.Request;
StaticFileContext.cs (1)
20private readonly HttpRequest _request;
Microsoft.AspNetCore.TestHost (5)
ClientHandler.cs (1)
112var req = context.Request;
HttpContextBuilder.cs (1)
39var request = _httpContext.Request;
TestServer.cs (1)
214var request = context.Request;
WebSocketClient.cs (2)
44public Action<HttpRequest>? ConfigureRequest { get; set; } 60var request = context.Request;
Microsoft.AspNetCore.TestHost.Tests (1)
Utilities.cs (1)
13internal static bool? CanHaveBody(this HttpRequest request)
RoutingSandbox (1)
UseRouterStartup.cs (1)
24var request = httpContext.Request;
RoutingWebSite (1)
UseRouterStartup.cs (1)
24var request = httpContext.Request;
SignalR.Client.FunctionalTestApp (1)
Startup.cs (1)
76var request = context.HttpContext.Request;
Sockets.FunctionalTests (6)
src\Servers\Kestrel\shared\test\TestApp.cs (4)
16var request = httpContext.Request; 29var request = httpContext.Request; 46var request = httpContext.Request; 63var request = httpContext.Request;
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
860var request = httpContext.Request;
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
213var request = httpContext.Request;
VersioningWebSite (2)
VersionRangeValidator.cs (2)
21public static string GetVersion(HttpRequest request) 31private bool ProcessRequest(HttpRequest request)