IHttpContextAccessor Interface  
Definition
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.
Provides access to the current HttpContext, if one is available.
public interface class IHttpContextAccessorpublic interface IHttpContextAccessortype IHttpContextAccessor = interfacePublic Interface IHttpContextAccessor- Derived
Remarks
This interface should be used with caution. It relies on AsyncLocal<T> which can have a negative performance impact on async calls. It also creates a dependency on "ambient state" which can make testing more difficult.
Properties
| HttpContext | Gets or sets the current HttpContext. Returns  |