-4

can anyone help me translating this curl command to C# https GET request?

curl -v -H 'Authorization: Bearer <your_access_key>' https://api.connector.mbed.com/endpoints/
Uwe Keim
  • 38,279
  • 56
  • 171
  • 280

1 Answers1

0

Try this:

WebClient client = new WebClient();
client.Headers.Add("Authorization", "Bearer <your_access_key>");
string response = client.DownloadString("https://api.connector.mbed.com/endpoints/");
Jan Jongboom
  • 25,622
  • 9
  • 81
  • 118