Home > Net >  A custom class how to customize the HTTP return
A custom class how to customize the HTTP return

Time:05-12

If is in the controller can use the Response Headers. The Add (); To implement the

In custom class in a class library. How to realize the Response Headers. The Add (); The effect of the
?

CodePudding user response:

Using dependency injection, constructor injection IHttpContextAccessor
He has a HttpContext inside

Remember to register services. AddHttpContextAccessor ()

CodePudding user response:

In addition to the injection can
  • Related