How do I get the real error message in HttpClient response.ReasonPhrase?
问题 My Setting I have 2 WebApi projects with the following flow: User makes request to API 1 API 1 makes request to API 2 on behalf of the user (using an HttpClient ). using (var client = new HttpClient()) { client.SetBearerToken(token); string endpoint = PbbSettings.Identity.Users.Delete.Replace("{userId}", userId); // Attempt deletion of the user using (var response = await client.DeleteAsync(endpoint)) { // Throw exception if not succeeded EnsureSuccess(response); } } The Problem So the flow