Kaynağa Gözat

Merge branch '0.10.2' of github.com:wkh237/react-native-fetch-blob into 0.10.2

Ben Hsieh 8 yıl önce
ebeveyn
işleme
f7a007a28c

+ 0
- 1
src/ios/RNFetchBlobFS.h Dosyayı Görüntüle

10
 #define RNFetchBlobFS_h
10
 #define RNFetchBlobFS_h
11
 
11
 
12
 #import "RNFetchBlob.h"
12
 #import "RNFetchBlob.h"
13
-
14
 #import <Foundation/Foundation.h>
13
 #import <Foundation/Foundation.h>
15
 
14
 
16
 #if __has_include(<React/RCTAssert.h>)
15
 #if __has_include(<React/RCTAssert.h>)

+ 30
- 30
src/ios/RNFetchBlobFS.m Dosyayı Görüntüle

64
 
64
 
65
 // static member getter
65
 // static member getter
66
 + (NSArray *) getFileStreams {
66
 + (NSArray *) getFileStreams {
67
-    
67
+
68
     if(fileStreams == nil)
68
     if(fileStreams == nil)
69
         fileStreams = [[NSMutableDictionary alloc] init];
69
         fileStreams = [[NSMutableDictionary alloc] init];
70
     return fileStreams;
70
     return fileStreams;
115
 }
115
 }
116
 
116
 
117
 + (NSString *) getTempPath {
117
 + (NSString *) getTempPath {
118
-    
118
+
119
     return NSTemporaryDirectory();
119
     return NSTemporaryDirectory();
120
 }
120
 }
121
 
121
 
122
 + (NSString *) getTempPath:(NSString*)taskId withExtension:(NSString *)ext {
122
 + (NSString *) getTempPath:(NSString*)taskId withExtension:(NSString *)ext {
123
-    
123
+
124
     NSString * documentDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
124
     NSString * documentDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
125
     NSString * filename = [NSString stringWithFormat:@"/RNFetchBlob_tmp/RNFetchBlobTmp_%@", taskId];
125
     NSString * filename = [NSString stringWithFormat:@"/RNFetchBlob_tmp/RNFetchBlobTmp_%@", taskId];
126
     if(ext != nil)
126
     if(ext != nil)
129
     return tempPath;
129
     return tempPath;
130
 }
130
 }
131
 
131
 
132
-#pragma margk - readStream 
132
+#pragma margk - readStream
133
 
133
 
134
 + (void) readStream:(NSString *)uri
134
 + (void) readStream:(NSString *)uri
135
            encoding:(NSString * )encoding
135
            encoding:(NSString * )encoding
139
           bridgeRef:(RCTBridge *)bridgeRef
139
           bridgeRef:(RCTBridge *)bridgeRef
140
 {
140
 {
141
     [[self class] getPathFromUri:uri completionHandler:^(NSString *path, ALAssetRepresentation *asset) {
141
     [[self class] getPathFromUri:uri completionHandler:^(NSString *path, ALAssetRepresentation *asset) {
142
-    
142
+
143
         __block RCTEventDispatcher * event = bridgeRef.eventDispatcher;
143
         __block RCTEventDispatcher * event = bridgeRef.eventDispatcher;
144
         __block int read = 0;
144
         __block int read = 0;
145
         __block int backoff = tick *1000;
145
         __block int backoff = tick *1000;
193
             // release buffer
193
             // release buffer
194
             if(buffer != nil)
194
             if(buffer != nil)
195
                 free(buffer);
195
                 free(buffer);
196
-            
196
+
197
         }
197
         }
198
         @catch (NSError * err)
198
         @catch (NSError * err)
199
         {
199
         {
205
             NSDictionary * payload = @{ @"event": FS_EVENT_END, @"detail": @"" };
205
             NSDictionary * payload = @{ @"event": FS_EVENT_END, @"detail": @"" };
206
             [event sendDeviceEventWithName:streamId body:payload];
206
             [event sendDeviceEventWithName:streamId body:payload];
207
         }
207
         }
208
-        
208
+
209
     }];
209
     }];
210
-    
211
-    
210
+
211
+
212
 }
212
 }
213
 
213
 
214
 // send read stream chunks via native event emitter
214
 // send read stream chunks via native event emitter
243
         NSDictionary * payload = @{ @"event": FS_EVENT_DATA,  @"detail" : asciiArray };
243
         NSDictionary * payload = @{ @"event": FS_EVENT_DATA,  @"detail" : asciiArray };
244
         [event sendDeviceEventWithName:streamId body:payload];
244
         [event sendDeviceEventWithName:streamId body:payload];
245
     }
245
     }
246
-    
247
-    
246
+
247
+
248
 }
248
 }
249
 
249
 
250
 # pragma write file from file
250
 # pragma write file from file
274
         }
274
         }
275
         else if(asset != nil)
275
         else if(asset != nil)
276
         {
276
         {
277
-            
277
+
278
             __block NSOutputStream * os = [[NSOutputStream alloc] initToFileAtPath:dest append:append];
278
             __block NSOutputStream * os = [[NSOutputStream alloc] initToFileAtPath:dest append:append];
279
             int read = 0;
279
             int read = 0;
280
             int cursor = 0;
280
             int cursor = 0;
293
         else
293
         else
294
             callback(@"failed to resolve path", nil);
294
             callback(@"failed to resolve path", nil);
295
     }];
295
     }];
296
-    
296
+
297
     return 0;
297
     return 0;
298
 }
298
 }
299
 
299
 
342
             [content writeToFile:path atomically:YES];
342
             [content writeToFile:path atomically:YES];
343
         }
343
         }
344
         fm = nil;
344
         fm = nil;
345
-        
345
+
346
         resolve([NSNumber numberWithInteger:[content length]]);
346
         resolve([NSNumber numberWithInteger:[content length]]);
347
     }
347
     }
348
     @catch (NSException * e)
348
     @catch (NSException * e)
423
             else
423
             else
424
             {
424
             {
425
                 if(![[NSFileManager defaultManager] fileExistsAtPath:path]) {
425
                 if(![[NSFileManager defaultManager] fileExistsAtPath:path]) {
426
-                    
426
+
427
                     reject(@"RNFetchBlobFS readFile error", @"file not exists", nil);
427
                     reject(@"RNFetchBlobFS readFile error", @"file not exists", nil);
428
                     return;
428
                     return;
429
                 }
429
                 }
430
                 fileContent = [NSData dataWithContentsOfFile:path];
430
                 fileContent = [NSData dataWithContentsOfFile:path];
431
-                
431
+
432
             }
432
             }
433
             if(onComplete != nil)
433
             if(onComplete != nil)
434
                 onComplete(fileContent);
434
                 onComplete(fileContent);
435
-            
435
+
436
             if([[encoding lowercaseString] isEqualToString:@"utf8"]) {
436
             if([[encoding lowercaseString] isEqualToString:@"utf8"]) {
437
                 if(resolve != nil) {
437
                 if(resolve != nil) {
438
                     NSString * utf8 = [[NSString alloc] initWithData:fileContent encoding:NSUTF8StringEncoding];
438
                     NSString * utf8 = [[NSString alloc] initWithData:fileContent encoding:NSUTF8StringEncoding];
480
 
480
 
481
 + (NSDictionary *) stat:(NSString *) path error:(NSError **) error {
481
 + (NSDictionary *) stat:(NSString *) path error:(NSError **) error {
482
 
482
 
483
-    
483
+
484
     BOOL isDir = NO;
484
     BOOL isDir = NO;
485
     NSFileManager * fm = [NSFileManager defaultManager];
485
     NSFileManager * fm = [NSFileManager defaultManager];
486
     if([fm fileExistsAtPath:path isDirectory:&isDir] == NO) {
486
     if([fm fileExistsAtPath:path isDirectory:&isDir] == NO) {
498
              @"lastModified" : [NSNumber numberWithLong:(time_t) [lastModified timeIntervalSince1970]*1000],
498
              @"lastModified" : [NSNumber numberWithLong:(time_t) [lastModified timeIntervalSince1970]*1000],
499
              @"type" : isDir ? @"directory" : @"file"
499
              @"type" : isDir ? @"directory" : @"file"
500
             };
500
             };
501
-    
501
+
502
 }
502
 }
503
 
503
 
504
 # pragma mark - exists
504
 # pragma mark - exists
584
         [self.outStream close];
584
         [self.outStream close];
585
         self.outStream = nil;
585
         self.outStream = nil;
586
     }
586
     }
587
-    
587
+
588
 }
588
 }
589
 
589
 
590
 // Slice a file into another file, generally for support Blob implementation.
590
 // Slice a file into another file, generally for support Blob implementation.
614
             }
614
             }
615
             long size = [fm attributesOfItemAtPath:path error:nil].fileSize;
615
             long size = [fm attributesOfItemAtPath:path error:nil].fileSize;
616
             long max = MIN(size, [end longValue]);
616
             long max = MIN(size, [end longValue]);
617
-            
617
+
618
             if(![fm fileExistsAtPath:dest]) {
618
             if(![fm fileExistsAtPath:dest]) {
619
                 [fm createFileAtPath:dest contents:@"" attributes:nil];
619
                 [fm createFileAtPath:dest contents:@"" attributes:nil];
620
             }
620
             }
621
             [handle seekToFileOffset:[start longValue]];
621
             [handle seekToFileOffset:[start longValue]];
622
             while(read < expected)
622
             while(read < expected)
623
             {
623
             {
624
-                
624
+
625
                 NSData * chunk;
625
                 NSData * chunk;
626
                 long chunkSize = 0;
626
                 long chunkSize = 0;
627
                 if([start longValue] + read + 10240 > max)
627
                 if([start longValue] + read + 10240 > max)
639
                 if([chunk length] <= 0)
639
                 if([chunk length] <= 0)
640
                     break;
640
                     break;
641
                 long remain = expected - read;
641
                 long remain = expected - read;
642
-                
642
+
643
                 [os write:[chunk bytes] maxLength:chunkSize];
643
                 [os write:[chunk bytes] maxLength:chunkSize];
644
                 read += [chunk length];
644
                 read += [chunk length];
645
             }
645
             }
656
             [os open];
656
             [os open];
657
             long size = asset.size;
657
             long size = asset.size;
658
             long max = MIN(size, [end longValue]);
658
             long max = MIN(size, [end longValue]);
659
-            
659
+
660
             while(read < expected)
660
             while(read < expected)
661
             {
661
             {
662
-                
662
+
663
                 uint8_t * chunk[10240];
663
                 uint8_t * chunk[10240];
664
                 long chunkSize = 0;
664
                 long chunkSize = 0;
665
                 if([start longValue] + read + 10240 > max)
665
                 if([start longValue] + read + 10240 > max)
677
                 if( chunkRead <= 0)
677
                 if( chunkRead <= 0)
678
                     break;
678
                     break;
679
                 long remain = expected - read;
679
                 long remain = expected - read;
680
-                
680
+
681
                 [os write:chunk maxLength:chunkSize];
681
                 [os write:chunk maxLength:chunkSize];
682
                 read += chunkRead;
682
                 read += chunkRead;
683
             }
683
             }
688
         {
688
         {
689
             reject(@"slice error",  [NSString stringWithFormat: @"could not resolve URI %@", path ], nil);
689
             reject(@"slice error",  [NSString stringWithFormat: @"could not resolve URI %@", path ], nil);
690
         }
690
         }
691
-        
691
+
692
     }];
692
     }];
693
 }
693
 }
694
 
694
 
701
         [[RNFetchBlobFS getFileStreams] setValue:nil forKey:self.streamId];
701
         [[RNFetchBlobFS getFileStreams] setValue:nil forKey:self.streamId];
702
         self.streamId = nil;
702
         self.streamId = nil;
703
     }
703
     }
704
-    
704
+
705
 }
705
 }
706
 
706
 
707
 
707
 
737
     NSError *error = nil;
737
     NSError *error = nil;
738
     NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
738
     NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
739
     NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:[paths lastObject] error: &error];
739
     NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:[paths lastObject] error: &error];
740
-    
740
+
741
     if (dictionary) {
741
     if (dictionary) {
742
         NSNumber *fileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemSize];
742
         NSNumber *fileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemSize];
743
         NSNumber *freeFileSystemSizeInBytes = [dictionary objectForKey:NSFileSystemFreeSize];
743
         NSNumber *freeFileSystemSizeInBytes = [dictionary objectForKey:NSFileSystemFreeSize];
750
     } else {
750
     } else {
751
         callback(@[@"failed to get storage usage."]);
751
         callback(@[@"failed to get storage usage."]);
752
     }
752
     }
753
-    
753
+
754
 }
754
 }
755
 
755
 
756
 + (void) writeAssetToPath:(ALAssetRepresentation * )rep dest:(NSString *)dest
756
 + (void) writeAssetToPath:(ALAssetRepresentation * )rep dest:(NSString *)dest

+ 13
- 13
src/ios/RNFetchBlobNetwork.m Dosyayı Görüntüle

127
         [cookieStr appendString:cookie.name];
127
         [cookieStr appendString:cookie.name];
128
         [cookieStr appendString:@"="];
128
         [cookieStr appendString:@"="];
129
         [cookieStr appendString:cookie.value];
129
         [cookieStr appendString:cookie.value];
130
-        
130
+
131
         if(cookie.expiresDate == nil) {
131
         if(cookie.expiresDate == nil) {
132
             [cookieStr appendString:@"; max-age=0"];
132
             [cookieStr appendString:@"; max-age=0"];
133
         }
133
         }
138
             NSString *strDate = [dateFormatter stringFromDate:cookie.expiresDate];
138
             NSString *strDate = [dateFormatter stringFromDate:cookie.expiresDate];
139
             [cookieStr appendString:strDate];
139
             [cookieStr appendString:strDate];
140
         }
140
         }
141
-        
142
-        
141
+
142
+
143
         [cookieStr appendString:@"; domain="];
143
         [cookieStr appendString:@"; domain="];
144
         [cookieStr appendString:hostname];
144
         [cookieStr appendString:hostname];
145
         [cookieStr appendString:@"; path="];
145
         [cookieStr appendString:@"; path="];
146
         [cookieStr appendString:cookie.path];
146
         [cookieStr appendString:cookie.path];
147
-        
148
-        
147
+
148
+
149
         if (cookie.isSecure) {
149
         if (cookie.isSecure) {
150
             [cookieStr appendString:@"; secure"];
150
             [cookieStr appendString:@"; secure"];
151
         }
151
         }
152
-        
152
+
153
         if (cookie.isHTTPOnly) {
153
         if (cookie.isHTTPOnly) {
154
             [cookieStr appendString:@"; httponly"];
154
             [cookieStr appendString:@"; httponly"];
155
         }
155
         }
284
         respData = [[NSMutableData alloc] init];
284
         respData = [[NSMutableData alloc] init];
285
         respFile = NO;
285
         respFile = NO;
286
     }
286
     }
287
-    
287
+
288
     __block NSURLSessionDataTask * task = [session dataTaskWithRequest:req];
288
     __block NSURLSessionDataTask * task = [session dataTaskWithRequest:req];
289
     [taskTable setObject:task forKey:taskId];
289
     [taskTable setObject:task forKey:taskId];
290
     [task resume];
290
     [task resume];
293
     if([[options objectForKey:CONFIG_INDICATOR] boolValue] == YES)
293
     if([[options objectForKey:CONFIG_INDICATOR] boolValue] == YES)
294
         [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
294
         [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
295
     __block UIApplication * app = [UIApplication sharedApplication];
295
     __block UIApplication * app = [UIApplication sharedApplication];
296
-    
296
+
297
     // #115 handling task expired when application entering backgound for a long time
297
     // #115 handling task expired when application entering backgound for a long time
298
     UIBackgroundTaskIdentifier tid = [app beginBackgroundTaskWithName:taskId expirationHandler:^{
298
     UIBackgroundTaskIdentifier tid = [app beginBackgroundTaskWithName:taskId expirationHandler:^{
299
         NSLog([NSString stringWithFormat:@"session %@ expired", taskId ]);
299
         NSLog([NSString stringWithFormat:@"session %@ expired", taskId ]);
316
         [bridge.eventDispatcher sendDeviceEventWithName:EVENT_EXPIRE body:args];
316
         [bridge.eventDispatcher sendDeviceEventWithName:EVENT_EXPIRE body:args];
317
 
317
 
318
     }
318
     }
319
-    
319
+
320
     // clear expired task entries
320
     // clear expired task entries
321
     [expirationTable removeAllObjects];
321
     [expirationTable removeAllObjects];
322
     expirationTable = [[NSMapTable alloc] init];
322
     expirationTable = [[NSMapTable alloc] init];
422
                 [cookiesTable setObject:cookies forKey:response.URL.host];
422
                 [cookiesTable setObject:cookies forKey:response.URL.host];
423
             }
423
             }
424
         }
424
         }
425
-        
425
+
426
         [self.bridge.eventDispatcher
426
         [self.bridge.eventDispatcher
427
          sendDeviceEventWithName: EVENT_STATE_CHANGE
427
          sendDeviceEventWithName: EVENT_STATE_CHANGE
428
          body:respInfo
428
          body:respInfo
445
             }
445
             }
446
             BOOL overwrite = [options valueForKey:@"overwrite"] == nil ? YES : [[options valueForKey:@"overwrite"] boolValue];
446
             BOOL overwrite = [options valueForKey:@"overwrite"] == nil ? YES : [[options valueForKey:@"overwrite"] boolValue];
447
             BOOL appendToExistingFile = [destPath RNFBContainsString:@"?append=true"];
447
             BOOL appendToExistingFile = [destPath RNFBContainsString:@"?append=true"];
448
-            
448
+
449
             appendToExistingFile = !overwrite;
449
             appendToExistingFile = !overwrite;
450
 
450
 
451
             // For solving #141 append response data if the file already exists
451
             // For solving #141 append response data if the file already exists
559
         // if it turns out not to be `nil` that means the response data contains valid UTF8 string,
559
         // if it turns out not to be `nil` that means the response data contains valid UTF8 string,
560
         // in order to properly encode the UTF8 string, use URL encoding before BASE64 encoding.
560
         // in order to properly encode the UTF8 string, use URL encoding before BASE64 encoding.
561
         NSString * utf8 = [[NSString alloc] initWithData:respData encoding:NSUTF8StringEncoding];
561
         NSString * utf8 = [[NSString alloc] initWithData:respData encoding:NSUTF8StringEncoding];
562
-        
562
+
563
         if(responseFormat == BASE64)
563
         if(responseFormat == BASE64)
564
         {
564
         {
565
             rnfbRespType = RESP_TYPE_BASE64;
565
             rnfbRespType = RESP_TYPE_BASE64;
652
 
652
 
653
 - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest * _Nullable))completionHandler
653
 - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest * _Nullable))completionHandler
654
 {
654
 {
655
-    
655
+
656
     if(followRedirect)
656
     if(followRedirect)
657
     {
657
     {
658
         if(request.URL != nil)
658
         if(request.URL != nil)

+ 5
- 5
src/ios/RNFetchBlobReqBuilder.m Dosyayı Görüntüle

39
 {
39
 {
40
     //    NSString * encodedUrl = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
40
     //    NSString * encodedUrl = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
41
     NSString * encodedUrl = url;
41
     NSString * encodedUrl = url;
42
-    
42
+
43
     // send request
43
     // send request
44
     __block NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString: encodedUrl]];
44
     __block NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString: encodedUrl]];
45
     __block NSMutableDictionary *mheaders = [[NSMutableDictionary alloc] initWithDictionary:[RNFetchBlobNetwork normalizeHeaders:headers]];
45
     __block NSMutableDictionary *mheaders = [[NSMutableDictionary alloc] initWithDictionary:[RNFetchBlobNetwork normalizeHeaders:headers]];
102
                 {
102
                 {
103
                     [mheaders setValue:@"application/octet-stream" forKey:@"Content-Type"];
103
                     [mheaders setValue:@"application/octet-stream" forKey:@"Content-Type"];
104
                 }
104
                 }
105
-                
105
+
106
                 // when body is a string contains file path prefix, try load file from the path
106
                 // when body is a string contains file path prefix, try load file from the path
107
                 if([body hasPrefix:FILE_PREFIX]) {
107
                 if([body hasPrefix:FILE_PREFIX]) {
108
                     __block NSString * orgPath = [body substringFromIndex:[FILE_PREFIX length]];
108
                     __block NSString * orgPath = [body substringFromIndex:[FILE_PREFIX length]];
130
                 }
130
                 }
131
                 // otherwise convert it as BASE64 data string
131
                 // otherwise convert it as BASE64 data string
132
                 else {
132
                 else {
133
-                    
133
+
134
                     __block NSString * cType = [[self class]getHeaderIgnoreCases:@"content-type" fromHeaders:mheaders];
134
                     __block NSString * cType = [[self class]getHeaderIgnoreCases:@"content-type" fromHeaders:mheaders];
135
                     // when content-type is application/octet* decode body string using BASE64 decoder
135
                     // when content-type is application/octet* decode body string using BASE64 decoder
136
                     if([[cType lowercaseString] hasPrefix:@"application/octet"] || [[cType lowercaseString] RNFBContainsString:@";base64"])
136
                     if([[cType lowercaseString] hasPrefix:@"application/octet"] || [[cType lowercaseString] RNFBContainsString:@";base64"])
253
 }
253
 }
254
 
254
 
255
 +(NSString *) getHeaderIgnoreCases:(NSString *)field fromHeaders:(NSMutableDictionary *) headers {
255
 +(NSString *) getHeaderIgnoreCases:(NSString *)field fromHeaders:(NSMutableDictionary *) headers {
256
-    
256
+
257
     NSString * normalCase = [headers valueForKey:field];
257
     NSString * normalCase = [headers valueForKey:field];
258
     NSString * ignoredCase = [headers valueForKey:[field lowercaseString]];
258
     NSString * ignoredCase = [headers valueForKey:[field lowercaseString]];
259
     if( normalCase != nil)
259
     if( normalCase != nil)
260
         return normalCase;
260
         return normalCase;
261
     else
261
     else
262
         return ignoredCase;
262
         return ignoredCase;
263
-    
263
+
264
 }
264
 }
265
 
265
 
266
 
266
 

+ 12
- 2
test/test-0.10.2.js Dosyayı Görüntüle

43
     let correct = date/Date.now() > 0.95 || date/Date.now() < 1.05;
43
     let correct = date/Date.now() > 0.95 || date/Date.now() < 1.05;
44
     report(<Assert key="modification date should be correct"
44
     report(<Assert key="modification date should be correct"
45
       expect={true} actual={correct}/>);
45
       expect={true} actual={correct}/>);
46
-    done();
46
+    done()
47
 
47
 
48
   })
48
   })
49
 
49
 
57
   .then((res) => {
57
   .then((res) => {
58
     console.log(res.data)
58
     console.log(res.data)
59
     report(<Assert key="should not redirect twice" expect={1} actual={res.info().redirects.length}/>);
59
     report(<Assert key="should not redirect twice" expect={1} actual={res.info().redirects.length}/>);
60
-    done();
60
+    done()
61
   })
61
   })
62
 
62
 
63
 })
63
 })
64
+
65
+describe('#241 null header silent failed issue', (report, done) => {
66
+
67
+  RNFetchBlob.fetch('GET', `${TEST_SERVER_URL}/public/github.png`, {
68
+    foo : null
69
+  })
70
+  .then(() => {
71
+    done()
72
+  })
73
+})