I am trying to call webservice created in PHP.The request and response is succesfull when i send this from php :
$.post(
'http://166.178.11.18/server/xs/reliable.php',
{"name":value2}, // any data you want to send to the script
function( data ){
$( 'body ').append( data );
});
This works perfectly fine through php code but when i am trying to send it from objective C code,server is not able to receive the parameters ,response shows request for null value. I am calling it as:
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url];
[theRequest setHTTPMethod:@"POST"];
[theRequest setValue:currentUniqueID forKey:@"name"];
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
// Do something here
}
But this one returns response for null ID value.