Hello,
I initiate a request to the Visa Offers Platform with the following code:
NSError *error; NSData *postData = [NSJSONSerialization dataWithJSONObject:requestDataDictionary options:0 error:&error]; if (error) { NSException* jsonSerializationException = [NSException exceptionWithName:@"JSONSerializationException" reason:@"JSON Serialization Failed" userInfo:nil]; @throw jsonSerializationException; } [request setHTTPBody:postData]; NSURLSessionDataTask *postDataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { NSLog(@"Response:%@", response); }]; [postDataTask resume];
I get this error. Any idea what goes wrong ?
Hi,
From the logs, it seems like you are getting SSL handshake exception. It may be due to certificates not being passed along with the request. Please refer to the below blog for recommended architecture and plan to connect using a server layer.
Thanks,
Jai