HttpRequest.Path Property

Definition

Gets or sets the portion of the request path that identifies the requested resource.

The value may be Empty if PathBase contains the full path, or for 'OPTIONS *' requests. The path is fully decoded by the server except for '%2F', which would decode to '/' and change the meaning of the path segments. '%2F' can only be replaced after splitting the path into segments.

C#
public abstract Microsoft.AspNetCore.Http.PathString Path { get; set; }

Property Value

The request path from RequestPath.

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0