Here's what I'm trying to do:
I'm attempting to pass a string from a UITableView selection into a web service and return a data set. When I hard code the parameter, the code works fine. When using the code below, I get this error:
-[NSCFString stringByReplacingOccurencesOfString:withString:]: unrecognized selector sent to instance 0x6054
-(void) getStateData
{
stateWebService = [[NSMutableData data] retain];
NSMutableURLRequest *request = [[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.**********.com/webservices.asmx/getCGbyState?"]] retain];
//[request appendString:_Campground.country];
NSString *country = [_Campground.country stringByReplacingOccurencesOfString:@" " withString:@""];
[request setHTTPMethod:@"POST"];
NSString *postString = (@"country=%@",country);
[request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection *myConnection = [NSURLConnection connectionWithRequest:request delegate:self];
[myConnection start];
}