c# - 如何在 Discord 上正确使用 unirest-net
问题描述
我想ReplyAsync
为一首特定的歌曲添加歌词,所以我使用了 unirest-net api。这是我使用命令的方式:
/// <summary> The lyric generating task </summary>
/// <returns> The <see cref="Task"/> </returns>
[Command("lyric")]
public async Task LyricTask()
{
Task<HttpResponse<string>> response = Unirest.get("https://musixmatchcom-musixmatch.p.mashape.com/wsr/1.1/matcher.lyrics.get?q_artist=imagine+dragons&q_track=Battle+cry")
.header("X-Mashape-Key", "secret_key")
.header("Accept", "application/json")
.asJsonAsync<string>();
await this.ReplyAsync(response.ToString());
}
但我总是得到输出System.Threading.Tasks.Task1[unirest_net.http.HttpResponse1[System.String]]
。我做错了什么,我该如何让它发挥作用?
解决方案
推荐阅读
- npm - Verdaccio - 无需登录即可发布?
- angular - 防止 BsDateRangePicker 显示未来几个月 | 角8
- python - 我正在尝试从字典字典中构建连接字典
- python - 如何创建一个 matplotlib 图形,该图形可以显示可滚动的熊猫数据框,如 Excel 电子表格
- python - Python 和 Wxpython | 这个程序需要访问屏幕吗?
- typescript - rxjs 中的纯函数
- java - Java将类视为包?
- java - 错误:不兼容的类型:上下文无法转换为 ArrayList
- google-cloud-dataflow - 使用 BQ 数据作为 pubsub 事件的侧输入
- visual-studio - 如何将 Azure SQL 连接到 Visual Studio?