title: C++ REST SDK (Casablanca) - How to get HTTP Proxy settings
body: <p>I am using the Casablanca C++ REST SDK to perform a web request, however I would like the code to be smart enough to detect any system proxy settings.  In C#, I believe this is as easy as:</p>
  
  <pre><code>WebRequest.DefaultProxy = WebRequest.GetSystemWebProxy();
  </code></pre>
  
  <p>But how can I do the equivalent in C++ using the REST SDK library?
  I have the following code so far but it requires manual setting of the proxy information:</p>
  
  <pre><code>http_client_config config;
  
  // Set proxy information if it's enabled
  if (_bClientProxyEnabled)
  {
      config.set_proxy(web::web_proxy(web::uri(utility::conversions::to_string_t(_sClientProxyServer))));
      credentials cred(utility::conversions::to_string_t(_sClientProxyUsername),
          utility::conversions::to_string_t(_sClientProxyPassword));
      // Set credentials
      config.set_credentials(cred);
  }
  
  http_client client(utility::conversions::to_string_t(this-&gt;serverUrl.c_str()), config);
  
  // Build request URI and start the request.
  uri_builder builder(utility::conversions::to_string_t(serverEndpoint));
  </code></pre>
  
  <p>Any ideas on how to make this code automatically detect the default system proxy?</p>