Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​AspNetCore.​Http.​HttpContext

Assembly: Microsoft.AspNetCore.Http.Abstractions

Inheritance: object → HttpContext

Encapsulates all HTTP-specific information about an individual HTTP request.

Properties

Features
Gets the collection of HTTP features provided by the server and middleware available on this request.
public HttpRequest
Request
Gets the <see cref="T:Microsoft.AspNetCore.Http.HttpRequest" /> object for this request.
public HttpResponse
Response
Gets the <see cref="T:Microsoft.AspNetCore.Http.HttpResponse" /> object for this request.
Connection
Gets information about the underlying connection for this request.
WebSockets
Gets an object that manages the establishment of WebSocket connections for this request.
Gets or sets the user for this request.
Items
Gets or sets a key/value collection that can be used to share data within the scope of this request.
RequestServices
Gets or sets the <see cref="T:System.IServiceProvider" /> that provides access to the request's service container.
Notifies when the connection underlying this request is aborted and thus request operations should be cancelled.
public string
TraceIdentifier
Gets or sets a unique identifier to represent this request in trace logs.
public ISession
Session
Gets or sets the object used to manage user session data for this request.

Methods

public void
Abort​()
Aborts the connection underlying this request.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object