Skip to content

Commit 64505d7

Browse files
committed
address ropc issue
1 parent fb1ca8e commit 64505d7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

aspnetcore/fundamentals/use-http-context.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ author: jamesnk
44
description: How to use HttpContext in ASP.NET Core.
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: wpickett
7-
ms.date: 01/31/2022
7+
ms.date: 10/07/2024
88
uid: fundamentals/use-httpcontext
99
---
10+
<!-- ms.sfi.ropc: t -->
11+
1012
# Use HttpContext in ASP.NET Core
1113

1214
[!INCLUDE[](~/includes/not-latest-version.md)]
@@ -28,9 +30,11 @@ Commonly used members on `HttpRequest` include:
2830
|<xref:Microsoft.AspNetCore.Http.HttpRequest.Headers?displayProperty=nameWithType>|A collection of request headers.|`user-agent=Edge`<br />`x-custom-header=MyValue`|
2931
|<xref:Microsoft.AspNetCore.Http.HttpRequest.RouteValues?displayProperty=nameWithType>|A collection of route values. The collection is set when the request is matched to a route.|`language=en`<br />`article=getstarted`|
3032
|<xref:Microsoft.AspNetCore.Http.HttpRequest.Query?displayProperty=nameWithType>|A collection of query values parsed from <xref:Microsoft.AspNetCore.Http.HttpRequest.QueryString>.|`filter=hello`<br />`page=1`|
31-
|[HttpRequest.ReadFormAsync()](xref:Microsoft.AspNetCore.Http.HttpRequest.ReadFormAsync(System.Threading.CancellationToken))|A method that reads the request body as a form and returns a form values collection. For information about why `ReadFormAsync` should be used to access form data, see [Prefer ReadFormAsync over Request.Form](xref:fundamentals/best-practices#prefer-readformasync-over-requestform).|`[email protected]`<br />`password=TNkt4taM`|
33+
|[HttpRequest.ReadFormAsync()](xref:Microsoft.AspNetCore.Http.HttpRequest.ReadFormAsync(System.Threading.CancellationToken))|A method that reads the request body as a form and returns a form values collection. For information about why `ReadFormAsync` should be used to access form data, see [Prefer ReadFormAsync over Request.Form](xref:fundamentals/best-practices#prefer-readformasync-over-requestform).|`[email protected]`|
3234
|<xref:Microsoft.AspNetCore.Http.HttpRequest.Body?displayProperty=nameWithType>|A <xref:System.IO.Stream> for reading the request body.|UTF-8 JSON payload|
3335

36+
[!INCLUDE [managed-identities](~/includes/managed-identities-test-non-production.md)]
37+
3438
### Get request headers
3539

3640
<xref:Microsoft.AspNetCore.Http.HttpRequest.Headers?displayProperty=nameWithType> provides access to the request headers sent with the HTTP request. There are two ways to access headers using this collection:

0 commit comments

Comments
 (0)