title: iPhone POSTing to Django and gets CSRF verification failed
body: <p>I send a POST request from IPhone to Django and get "CSRF verification failed", which I can't perfectly understand.
  I tried to find a good solution over the internet, but I couldn't .
  is there any simple way to POST to django?</p>
  
  <p>this is my code:</p>
  
  <pre><code>   NSString *post =[NSString stringWithFormat:@"s=aaa&amp;r=k&amp;c=gg"];
  NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
  NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
  NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
  [request setURL:[NSURL URLWithString:(@"http://localhost:8000/messages/views/")]];
  [request setHTTPMethod:@"POST"];
  [request setValue:postLength forHTTPHeaderField:@"Content-Length"];
  [request setValue:@"application/x-www-form-urlencoded charset=utf-8" forHTTPHeaderField:@"Content-Type"];
  [request setHTTPBody:postData];
  NSError *error;
  NSURLResponse *response;
  NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];
  NSString *data=[[NSString alloc]initWithData:urlData encoding:NSUTF8StringEncoding];
  NSLog(data);
  </code></pre>