Using NSURLRequest+NSURLConnection seems overkill for a webcall with no data return

Posted by Spectravideo328 on Stack Overflow See other posts from Stack Overflow or by Spectravideo328
Published on 2012-09-12T15:26:54Z Indexed on 2012/09/12 15:38 UTC
Read the original article Hit count: 267

All,

This might seems very straightforward but I have already gone through the URL loading system program guide and the various NSURL.... classes and not found my answer.

I am just trying to do a simple call from the app to a website to reserve a party spot:

NSString *path=[NSString stringWithFormat:@"http://www.myparty123.com/ireservedURL.asp?Nickname=%@&Seat=%i&Email=%@&Currentparty=%i",john,5432,[email protected],6598];
NSURL* reservationURL =[NSURL URLWithString:path];
NSData *call= [NSData dataWithContentsOfURL:reservationURL];   

This seemed to be the simple way but I get this warning that I am not using the "call" variable. And it seems overkill to do a call using NSData where there is no data return.

Yet, creating an NSURLRequest and initiating an NSURLConnection and then implementing delegates with that request seems to be overkill as well.

What am I missing.

Thanks KMB

© Stack Overflow or respective owner

Related posts about ios

Related posts about nsurlconnection