0

I'm new to IOS 5 and I'm trying to send json values to a remote php server, which will send me back the results. This is my dispach call so far:

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
    NSData* data = [NSData dataWithContentsOfURL: http://www.someurl/example.php];
    [self performSelectorOnMainThread:@selector(fetchedData:) withObject:data waitUntilDone:YES];
});

I know this is mainly a GET request. How can I send post values? Any help would be appreciated, thanks!

Michael Eilers Smith
  • 8,466
  • 20
  • 71
  • 106

1 Answers1

1

You will have to resort to NSURLRequest (or another request object) to do a POST. Try this question, Append data to a POST NSUrlRequest, as an example of how to send data and handle the result.

Community
  • 1
  • 1
Remy Vanherweghem
  • 3,925
  • 1
  • 32
  • 43