Currently, I'm using "dataWithContentsOfURL" to send data to server and I append the data to the URL as a HTTP GET request.
However, because some data lots of text, I would like to switch from HTTP GET to HTTP POST.
Hence, could I use dataWithContentsOfURL with HTTP POST. Any example?
NSURL *url1 = [NSURL URLWithString:concatenatedString];
dispatch_async(kBgQueue, ^{
NSData* data = [NSData dataWithContentsOfURL: url1];
[self performSelectorOnMainThread:@selector(fetchedData:) withObject:data waitUntilDone:YES];
});
Thanks
No, you can't do that. You really really should switch over to using an asynchronous NSURLConnection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With