Could you help me, with a example, where i consume a json webservice in a https url. i have tried: where urlConParametros is a https url.
NSString* encriptado = nil;
NSString* urlConParametros = [NSString stringWithFormat:@"%@%@?%@=%@", URL, metodo, key, valorSinEcncriptar];
NSError* error;
if(encriptado == nil){
NSMutableURLRequest *getRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlConParametros]];
[getRequest setHTTPMethod:@"GET"];
NSError *requestError;
NSURLResponse *urlResponse = nil;
NSData *response1 =[NSURLConnection sendSynchronousRequest:getRequest returningResponse:&urlResponse error:&requestError];
NSString* data = [NSString stringWithContentsOfURL:[NSURL URLWithString:urlConParametros] encoding:NSUTF8StringEncoding
error:&error];
return data;
}
but return data nil. My problem is that with http, the same web service response the correct data, but when it doing with https, the response is nil.