title: How to programmatically add a proxy to an NSURLSession
body: <p>Looking over the documentation of <code>NSURLSession</code> and <code>NSURLSessionConfiguration</code>, I was under the impression I should configure it with a dictionary like the following:</p>
  
  <pre><code>    // Create a dictionary to describe the proxy 
      NSDictionary *proxyDict = @{
          (NSString *)kCFProxyHostNameKey   : @"myProxyHost.com",
          (NSString *)kCFProxyPortNumberKey : @"12345",
          (NSString *)kCFProxyTypeKey       : (NSString*)kCFProxyTypeHTTP
      };
  
      // Create a configuration that uses the dictionary
      NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
      [configuration setConnectionProxyDictionary:proxyDict];
  </code></pre>
  
  <p>However, the requests from <code>NSURLSession</code> created with this configuration connect directly.</p>