如何访问System.Net.Http.HttpConnectionResponseContent的响应正文?

时间:2020-04-03 16:15:32

标签: asp.net-core .net-core sendgrid

如何访问System.Net.Http.HttpConnectionResponseContent的响应正文?

我正在尝试使用SendGrid API发送电子邮件,并且它返回一个“ HttpConnectionResponseContent”对象。如何从根本上到达响应正文(字符串)或JSON?我什至看不到如何掌握基础流。

enter image description here

1 个答案:

答案 0 :(得分:1)

您可以通过此操作获取内容正文:

response.Body.ReadAsStringAsync()

您可以参考this

相关问题