title: how to pass a dictionary using NSURLSession in post method?
body: <p>I do not know how to pass values in dictionary into server using <code>NSURLSession</code> via POST. Please help me to solve this problem.</p>
  
  <p>My dictionary contains contact information (name and phone number only), where the key is the person's name and the value is their phone number.</p>
  
  <p>I have sample code using nsurl connection - how can I convert it to use <code>NSURLSession</code>?</p>
  
  <pre><code>NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://holla.com/login"]];
  
  request.HTTPMethod = @"POST"; [request setValue:@"application/json; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
  
  NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@"212333333",@"ABCD",@"6544345345",@"NMHG", nil];
  
  NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dict options:0 error:nil];
  request.HTTPBody = jsonData;
  NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
  </code></pre>