Hi i have this code
NSLog(@"%@",URLRequestQueryString); NSString *sendToServerString = [NSString stringWithFormat:@"http://mydomain.co.uk/req.php%@",URLRequestQueryString]; NSURL *sendToServer = [[NSURL alloc] initWithString:sendToServerString]; NSLog(@"%@",sendToServer); NSLog(@"%@",sendToServerString);
URLRequestQueryString is the standard query string that I created in all of the script.
The first NSLog works fine and displays the correct sequence (if I copy and paste it into the browser, then the page will load and launch correctly.
This is also the case when I output sendToServerString , it correctly displays the URL using the query string (which I can also copy and paste into the browser).
However, sendToServer outputs (null). If I delete the request, it will correctly display the domain and path.
Any idea why this is happening? How can I sort it?
Thanks.
source share