@@ -275,7 +275,7 @@ function AFFailure(resolve, reject, task: NSURLSessionDataTask, error: NSError,
275275 sendi . content = new HttpsResponseLegacy ( data , sendi . contentLength , url ) ;
276276 resolve ( sendi ) ;
277277 } else {
278- const content : any = {
278+ const response : any = {
279279 body : parsedData ,
280280 contentLength : sendi . contentLength ,
281281 description : error . description ,
@@ -284,9 +284,10 @@ function AFFailure(resolve, reject, task: NSURLSessionDataTask, error: NSError,
284284 } ;
285285
286286 if ( policies . secured === true ) {
287- content . description = '@nativescript-community/https > Invalid SSL certificate! ' + content . description ;
287+ response . description = '@nativescript-community/https > Invalid SSL certificate! ' + response . description ;
288288 }
289- sendi . content = content ;
289+ sendi . content = parsedData ;
290+ sendi . response = response ;
290291
291292 resolve ( sendi ) ;
292293 }
@@ -369,9 +370,9 @@ export function createRequest(opts: HttpsRequestOptions, useLegacy: boolean = tr
369370
370371 let dict = null ;
371372 if ( opts . body ) {
372- dict = NSJSONSerialization . JSONObjectWithDataOptionsError ( NSString . stringWithString ( JSON . stringify ( opts . body ) ) . dataUsingEncoding ( NSUTF8StringEncoding ) , 0 ) ;
373+ dict = NSJSONSerialization . JSONObjectWithDataOptionsError ( NSString . stringWithString ( JSON . stringify ( opts . body ) ) . dataUsingEncoding ( NSUTF8StringEncoding ) , 0 as any ) ;
373374 } else if ( opts . content ) {
374- dict = NSJSONSerialization . JSONObjectWithDataOptionsError ( NSString . stringWithString ( opts . content ) . dataUsingEncoding ( NSUTF8StringEncoding ) , 0 ) ;
375+ dict = NSJSONSerialization . JSONObjectWithDataOptionsError ( NSString . stringWithString ( opts . content ) . dataUsingEncoding ( NSUTF8StringEncoding ) , 0 as any ) ;
375376 }
376377
377378 manager . requestSerializer . timeoutInterval = opts . timeout ? opts . timeout : 10 ;
0 commit comments