title: How to convert PHP cURLcode to C#
body: <p>I have no experience in php whatsoever, but I need to create the C# equivalent of this code:</p>
  <blockquote>
  <pre><code>&lt;?php
  
  $config['Api-key'] = 'UQ042222gh3TZJ6AWrLB';
  
  $config['Api-secret'] ='UQ042222-RTSmc8ROnCMyNVXnYn9eXAVGi7JhOoug0RTL';
  
  $config['Api-url']  =   'https://uquid.com/api/';
  
  function connectToApi( $endpoint='', $fields = array() )
  {   
  global $config;  
  $ch = curl_init();     
  $url =$config['Api-url'].$endpoint; 
  $fields_string =  http_build_query($fields);  
  
  curl_setopt($ch, CURLOPT_URL, $url); 
  curl_setopt($ch, CURLOPT_POST, 1); 
  curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1); 
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); 
  curl_setopt($ch,CURLOPT_HTTPHEADER, array('X-method-override:UQUID', 
  'Api-key:'.$config['Api-key'], 'Api-secret:'.$config['Api-secret']) );
  
   $server_output = curl_exec ($ch); 
   curl_close ($ch);   
   return $server_output;
  }
  
  function prettyPrint($json){   
  $json = json_decode($json);    
  echo '&lt;pre&gt;'.json_encode($json, JSON_PRETTY_PRINT).'&lt;/pre&gt;'; }
  </code></pre>
  </blockquote>
  <p>Please help me.Please Advice me.</p>