title: setHTTPBody in iOS 8 + Swift
body: <p>I am working on converting a custom Objective-C Networking manager that I wrote for a client into Swift, as a way to learn the language and familiarize myself with the docs.</p>
  
  <pre><code>NSData *postData = [NSJSONSerialization dataWithJSONObject:userData options:0 error:&amp;error];
  
  [request setHTTPBody:postData];
  </code></pre>
  
  <p>However, when I open up the apple docs regarding setHTTPBody, it says it is no longer supported past 7.1? </p>
  
  <p>In Swift, I have </p>
  
  <pre><code>/*Other Code*/
  
  var request = NSMutableURLRequest(URL: sampleUrl) 
  request.addValue("Content-Type", forHTTPHeaderField: "application/json")
  </code></pre>
  
  <p>I would assume a function along the lines of </p>
  
  <pre><code>request.setHTTPBody("data")
  </code></pre>
  
  <p>However - this does not seem to be the case... am I missing something? Or is there a new function to take the place of this deprecated one?</p>