.HttpContext.Features.Get().

2019-07-17 23:01发布

问题:

We are using the code below to send the custom message from server side to client side in HTTP request. It is working properly in .NET Core 2.0

Response.HttpContext.Features.Get<IHttpResponseFeature>().ReasonPhrase

While using the same code in .NET Core 2.1 it does not work. It doesn't throw any script errors but we couldn't get message in client side success.

How to resolve this problem?