【问题标题】:curl commands to C# mbed APIcurl 命令到 C# mbed API
【发布时间】:2018-01-01 16:00:54
【问题描述】:

谁能帮我把这个 curl 命令翻译成 C# https GET 请求?

curl -v -H 'Authorization: Bearer <your_access_key>' https://api.connector.mbed.com/endpoints/

【问题讨论】:

标签: c# rest mbed


【解决方案1】:

试试这个:

WebClient client = new WebClient();
client.Headers.Add("Authorization", "Bearer <your_access_key>");
string response = client.DownloadString("https://api.connector.mbed.com/endpoints/");

【讨论】:

  • 非常感谢您的回答,它与引号内的 URI 一起使用
  • 如果某个答案解决了您的问题,请将答案勾选为“已接受”(带有小复选框)。谢谢!
  • 对不起,我是新来的,这是我的第一个问题
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-08-29
  • 1970-01-01
  • 2013-04-18
  • 2016-03-25
  • 2023-03-31
  • 2019-05-03
  • 1970-01-01
相关资源
最近更新 更多