// 使用C#中的HttpResponseMessage对象检查HTTP响应状态码和消息 HttpResponseMessage response = await client.PostAsync(requestUri, content); if (response.IsSuccessStatusCode) { // 处理响应结果 var responseContent = await response.Content.ReadAsStringAsync(); // ... } else { // 处理错误消息 var errorContent = await response.Content.ReadAsStringAsync(); // ... }