-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
  • 39,551
  • 56
  • 175
  • 291

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
  • 26,598
  • 9
  • 83
  • 120