Microsoft.AspNetCore.Http Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Contains types for handling HTTP requests and responses.
Classes
BadHttpRequestException |
Represents an HTTP request error |
BindingAddress |
An address that a HTTP server may bind to. |
ConnectionInfo |
Represents the underlying connection for a request. |
CookieBuilder |
Defines settings used to create a cookie. |
CookieOptions |
Options used to create a new cookie. |
DefaultHttpContext |
Represents an implementation of the HTTP Context class. |
DefaultHttpContextFactory |
A factory for creating HttpContext instances. |
Endpoint |
Represents a logical endpoint in an application. |
EndpointHttpContextExtensions |
Extension methods to expose Endpoint on HttpContext. |
EndpointMetadataCollection |
A collection of arbitrary metadata associated with an endpoint. |
FormCollection |
Contains the parsed HTTP form values. |
FormFile |
Default implementation of IFormFile. |
FormFileCollection |
Default implementation of IFormFileCollection. |
HeaderDictionary |
Represents a wrapper for RequestHeaders and ResponseHeaders. |
HeaderDictionaryExtensions |
Contains extension methods for modifying an IHeaderDictionary instance. |
HeaderDictionaryTypeExtensions |
Extension methods for accessing strongly typed HTTP request and response headers. |
HttpContext |
Encapsulates all HTTP-specific information about an individual HTTP request. |
HttpContextAccessor |
Provides an implementation of IHttpContextAccessor based on the current execution context. |
HttpContextFactory |
Represents methods used to create an HTTP context object. |
HttpContextServerVariableExtensions |
Extensions for reading HTTP server variables. |
HttpMethods |
Contains methods to verify the request method of an HTTP request. |
HttpProtocol |
Contains methods to verify the request protocol version of an HTTP request. |
HttpRequest |
Represents the incoming side of an individual HTTP request. |
HttpRequestJsonExtensions |
Extension methods to read the request body as JSON. |
HttpRequestRewindExtensions |
Extension methods for enabling buffering in an HttpRequest. |
HttpResponse |
Represents the outgoing side of an individual HTTP request. |
HttpResponseJsonExtensions |
Provides extension methods for writing a JSON serialized value to the HTTP response. |
HttpResponseWritingExtensions |
Convenience methods for writing to the response. |
HttpValidationProblemDetails |
A ProblemDetails for validation errors. |
MiddlewareFactory |
Default implementation for IMiddlewareFactory. |
OpenApiRouteHandlerBuilderExtensions |
Extension methods for adding Metadata that is meant to be consumed by OpenAPI libraries. |
QueryCollection |
The HttpRequest query string collection |
RequestDelegateFactory |
Creates RequestDelegate implementations from Delegate request handlers. |
RequestDelegateFactoryOptions |
Options for controlling the behavior of the RequestDelegate when created using RequestDelegateFactory. |
RequestDelegateResult |
The result of creating a RequestDelegate from a Delegate |
RequestFormReaderExtensions |
Extension for HttpRequest. |
RequestTrailerExtensions |
HttpRequest extensions for working with request trailing headers. |
ResponseExtensions |
Extension methods for HttpResponse. |
ResponseTrailerExtensions |
Contains extension methods for modifying the |
Results |
A factory for IResult. |
SendFileFallback |
Helper type that allows copying a file to a Stream. This type is part of ASP.NET Core's infrastructure and should not used by application code. |
SendFileResponseExtensions |
Provides extensions for HttpResponse exposing the SendFile extension. |
SessionExtensions |
Extension methods for ISession. |
StatusCodes |
A collection of constants for HTTP status codes. Status Codes listed at http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
StreamResponseBodyFeature |
An implementation of IHttpResponseBodyFeature that aproximates all of the APIs over the given Stream. |
TagsAttribute |
Specifies a collection of tags in Metadata. |
WebSocketAcceptContext |
A context for negotiating a websocket upgrade. |
WebSocketManager |
Manages the establishment of WebSocket connections for a specific HTTP request. |
Structs
EndpointMetadataCollection.Enumerator |
Enumerates the elements of an EndpointMetadataCollection. |
FormCollection.Enumerator |
Enumerates a FormCollection. |
FragmentString |
Provides correct handling for FragmentString value when needed to generate a URI string |
HeaderDictionary.Enumerator |
Enumerates a HeaderDictionary. |
HostString |
Represents the host portion of a URI can be used to construct URI's properly formatted and encoded for use in HTTP headers. |
PathString |
Provides correct escaping for Path and PathBase values when needed to reconstruct a request or redirect URI string |
QueryCollection.Enumerator |
Enumerates a QueryCollection. |
QueryString |
Provides correct handling for QueryString value when needed to reconstruct a request or redirect URI string |
Interfaces
IFormCollection |
Represents the parsed form values sent with the HttpRequest. |
IFormFile |
Represents a file sent with the HttpRequest. |
IFormFileCollection |
Represents the collection of files sent with the HttpRequest. |
IHeaderDictionary |
Represents HttpRequest and HttpResponse headers |
IHttpContextAccessor |
Provides access to the current HttpContext, if one is available. |
IHttpContextFactory |
Provides methods to create and dispose of HttpContext instances. |
IMiddleware |
Defines middleware that can be added to the application's request pipeline. |
IMiddlewareFactory |
Provides methods to create middleware. |
IQueryCollection |
Represents the HttpRequest query string collection |
IRequestCookieCollection |
Represents the HttpRequest cookie collection |
IResponseCookies |
A wrapper for the response Set-Cookie header. |
IResult |
Defines a contract that represents the result of an HTTP endpoint. |
IResultExtensions |
Provides an interface for registering external methods that provide custom IResult instances. |
ISession |
Stores user data while the user browses a web application. Session state uses a store maintained by the application to persist data across requests from a client. The session data is backed by a cache and considered ephemeral data. |
Enums
CookieSecurePolicy |
Determines how cookie security properties are set. |
SameSiteMode |
Used to set the SameSite field on response cookies to indicate if those cookies should be included by the client on future "same-site" or "cross-site" requests. RFC Draft: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.1 |
Delegates
RequestDelegate |
A function that can process an HTTP request. |
Remarks
For more information about low-level HTTP APIs, see Access HttpContext in ASP.NET Core.