Microsoft.AspNetCore.Http.Abstractions by Microsoft

<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />

 HttpRequest

public abstract class HttpRequest
Represents the incoming side of an individual HTTP request.
public abstract Stream Body { get; set; }

Gets or sets the RequestBody Stream.

public abstract long? ContentLength { get; set; }

Gets or sets the Content-Length header.

public abstract string ContentType { get; set; }

Gets or sets the Content-Type header.

public abstract IRequestCookieCollection Cookies { get; set; }

Gets the collection of Cookies for this request.

public abstract IFormCollection Form { get; set; }

Gets or sets the request body as a form.

public abstract bool HasFormContentType { get; }

Checks the Content-Type header for form types.

public abstract IHeaderDictionary Headers { get; }

Gets the request headers.

public abstract HostString Host { get; set; }

Gets or sets the Host header. May include the port.

public abstract HttpContext HttpContext { get; }

Gets the HttpContext for this request.

public abstract bool IsHttps { get; set; }

Returns true if the RequestScheme is https.

public abstract string Method { get; set; }

Gets or sets the HTTP method.

public abstract PathString Path { get; set; }

Gets or sets the request path from RequestPath.

public abstract PathString PathBase { get; set; }

Gets or sets the RequestPathBase.

public abstract string Protocol { get; set; }

Gets or sets the RequestProtocol.

public abstract IQueryCollection Query { get; set; }

Gets the query value collection parsed from Request.QueryString.

public abstract QueryString QueryString { get; set; }

Gets or sets the raw query string used to create the query collection in Request.Query.

public abstract string Scheme { get; set; }

Gets or sets the HTTP request scheme.

protected HttpRequest()

public abstract Task<IFormCollection> ReadFormAsync(CancellationToken cancellationToken = default)

Reads the request body if it is a form.