title: How to send raw data to API
body: <p>I have one text field I need to send two data's to API.</p>
  
  <pre><code>            NSString *post =[NSString stringWithFormat:@"val1=%@,val2=%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"val1"],val2];
              NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
              NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
  
              NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
              [request setURL:[NSURL URLWithString:@"http://api.test.com/send"]];
              [request setHTTPMethod:@"POST"];
              [request setValue:postLength forHTTPHeaderField:@"Content-Length"];
              [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
              [request setHTTPBody:postData];
  
              NSError *error;
              NSURLResponse *response;
              NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];
              NSString *str=[[NSString alloc]initWithData:urlData encoding:NSUTF8StringEncoding];
              NSLog(@"log%@",str);
          }
  </code></pre>
  
  <p>I need to send only raw data to API this is my code.Please check and let me know thanks</p>