title: What is replacement of CFReadStreamCreateForStreamedHTTPRequest?
body: <p>In my objective C project i am using </p>
  
  <ul>
  <li>Segment 1).</li>
  </ul>
  
  <pre><code>[(NSInputStream *)CFReadStreamCreateForStreamedHTTPRequest(kCFAllocatorDefault, request,(CFReadStreamRef)[self postBodyReadStream]) autorelease]
  </code></pre>
  
  <p>but CFReadStreamCreateForStreamedHTTPRequest is deprecated 
  <strong>what can i write alternatively ?</strong></p>
  
  <p>I tried </p>
  
  <pre><code>NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
  </code></pre>
  
  <p>Error throws:- </p>
  
  <blockquote>
    <p>Incompatible pointer types sending 'CFHTTPMessageRef' (aka 'struct >__CFHTTPMessage *') to parameter of type 'NSURLRequest * _Nonnull'</p>
  </blockquote>
  
  <ul>
  <li>Segment 2).</li>
  </ul>
  
  <pre><code>(NSString *)kCFStreamPropertyHTTPProxyHost
  </code></pre>
  
  <blockquote>
    <p>'kCFStreamPropertyHTTPProxyHost' is deprecated:
    Haven't found any replacement API.</p>
  </blockquote>