@@ -5,7 +5,7 @@ let cache: NSURLCache;
55
66export function setCache ( options ?: Https . CacheOptions ) {
77 if ( options ) {
8- cache = NSURLCache . alloc ( ) . initWithMemoryCapacityDiskCapacityDirectoryURL ( options . memorySize , options . diskSize , NSURL . URLWithString ( options . diskLocation ) ) ;
8+ cache = NSURLCache . alloc ( ) . initWithMemoryCapacityDiskCapacityDiskPath ( options . memorySize , options . diskSize , options . diskLocation ) ;
99 } else {
1010 cache = null ;
1111 }
@@ -254,7 +254,7 @@ class HttpsResponse implements Https.HttpsResponseLegacy {
254254 return Promise . resolve ( this . imageSource ) ;
255255 }
256256 return new Promise < ImageSource > ( ( resolve , reject ) => {
257- ( < any > UIImage ) . tns_decodeImageWithDataCompletion ( this . data , ( image ) => {
257+ ( UIImage as any ) . tns_decodeImageWithDataCompletion ( this . data , ( image ) => {
258258 if ( image ) {
259259 resolve ( new ImageSource ( image ) ) ;
260260 } else {
@@ -387,7 +387,7 @@ function bodyToNative(cont) {
387387}
388388export function createRequest ( opts : Https . HttpsRequestOptions ) : Https . HttpsRequest {
389389 const manager = AFHTTPSessionManager . alloc ( ) . initWithBaseURL ( NSURL . URLWithString ( opts . url ) ) ;
390- const type = opts . headers && opts . headers [ 'Content-Type' ] ? < string > opts . headers [ 'Content-Type' ] : 'application/json' ;
390+ const type = opts . headers && opts . headers [ 'Content-Type' ] ? ( opts . headers [ 'Content-Type' ] as string ) : 'application/json' ;
391391 if ( type . startsWith ( 'application/json' ) ) {
392392 manager . requestSerializer = AFJSONRequestSerializer . serializer ( ) ;
393393 manager . responseSerializer = AFJSONResponseSerializer . serializerWithReadingOptions ( NSJSONReadingOptions . AllowFragments ) ;
0 commit comments