reST (reStructuredText) Question

curl commands to C# mbed API

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/

Answer Source

Try this:

WebClient client = new WebClient();
client.Headers.Add("Authorization", "Bearer <your_access_key>");
string response = client.DownloadString("https://api.connector.mbed.com/endpoints/");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download