I am trying to send the data to server from my IPhone client. It works fine for most values but when i try to send a string like "IPhone+Cocoa" the server shows the string as "IPhone Cocoa". I have tried to google it but without success is there any why of doing it.
Here is my code
-(void)sendRequestNSString *)aRequest {
NSMutableURLRequest *request =
[[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:kURLRequest]];
NSString *httpBody =
[NSString stringWithFormat:@"%@=%@",
[requestString stringByAddingPercentEscapesUsingEncoding:NSUTF8St ringEncoding],
[aRequest stringByAddingPercentEscapesUsingEncoding:NSUTF8St ringEncoding]];
NSData *aData = [httpBody dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:aData];
[request setHTTPMethod:@"POST"];
self.feedURLConnection =
[[NSURLConnection alloc] initWithRequest:request delegate:self];
}
I am really having trouble finding the solution for this. Is this a bug or I am wrong some where in my code. is there ant other alternative of doing this