Hi all,
In my app i have to send a xml data as request, I am creating the xml string like this
NSString* str = @"<Item><Name>";
str = [str stringByAppendingFormat:string1];
str = [str stringByAppendingFormat:@"</Name><Description>"];
str = [str stringByAppendingFormat:string2];
str = [str stringByAppendingFormat:@"</Description><Rate>"];
str = [str stringByAppendingFormat:string3];
str = [str stringByAppendingFormat:@"</Rate></Item>"];
after that i am creating a URLString.
NSString* curl = @"url?";
curl = [curl stringByAppendingString:@"string"];
curl = [curl stringByAppendingString:@"&apikey=@"value"&searchtext="];
curl = [curl stringByAppendingString:[aString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
Than i am creating NSURL by passing the string NSURL *finalURL = [NSURL URLWithString:curl];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:finalURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10]; [theRequest setHTTPMethod:@"POST"];
But i am not getting the result
Is encoding the xml string is correct?
Can any one help me out