Share via


HttpContextAccessor Class

Definition

Provides an implementation of IHttpContextAccessor based on the current execution context.

public ref class HttpContextAccessor : Microsoft::AspNetCore::Http::IHttpContextAccessor
public class HttpContextAccessor : Microsoft.AspNetCore.Http.IHttpContextAccessor
type HttpContextAccessor = class
    interface IHttpContextAccessor
Public Class HttpContextAccessor
Implements IHttpContextAccessor
Inheritance
HttpContextAccessor
Implements

Constructors

HttpContextAccessor()

Properties

HttpContext

Gets or sets the current HttpContext. Returns null if there is no active HttpContext.

Applies to