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

问题描述 投票:0回答:1

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

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

enter image description here

asp.net-core .net-core sendgrid
1个回答
0
投票

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

response.Body.ReadAsStringAsync()

您可以参考this

© www.soinside.com 2019 - 2024. All rights reserved.