title: How to call third party Restful API
body: <p>How could we call the below endpoints in C# webClient, I have managed this with GoogleScript but now I need it in C#</p>
  
  <pre><code>      var options = {
      "async": true,
      "crossDomain": true,
      "method" : "GET",
      "headers" : {
        "X-Api-Key" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "X-Api-Secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    };
  
    var response = UrlFetchApp.fetch('https://dashboard.reviewpush.com/api/company/locations',options);
    var pages = JSON.parse(response.getContentText());
  </code></pre>
  
  <p>how we can pass headers with multiple values to the request, the code that i have tried is to as below</p>
  
  <pre><code>public static void Main (string[] args)
  {
      string url = "https://dashboard.reviewpush.com/api/company/locations";
  
      using (var client = new WebClient())
      {
          client.Headers[HttpRequestHeader.ContentType] = "application/json";
          client.Headers["X-IFORM-API-REQUEST-ENCODING"] = "JSON";
          client.Headers["async"] ="true";
          client.Headers["crossDomain"] = "true";
          client.Headers["method"] = "GET";
          client.Headers["headers"] = "{'X-Api-Key' : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            'X-Api-Secret': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  }";
  
          Stream data = client.OpenRead (args[0]);
          StreamReader reader = new StreamReader (data);
          string s = reader.ReadToEnd ();
          Console.WriteLine (s);
          data.Close();
          reader.Close();
  }
  </code></pre>