Explorar el Código

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

Ben Hsieh hace 8 años
padre
commit
58d63d21a0
Se han modificado 1 ficheros con 11 adiciones y 2 borrados
  1. 11
    2
      README.md

+ 11
- 2
README.md Ver fichero

@@ -23,6 +23,7 @@ A project committed to make file acess and data transfer easier, effiecient for
23 23
  * [Cancel HTTP request](#user-content-cancel-request)
24 24
  * [Android Media Scanner, and Download Manager Support](#user-content-android-media-scanner-and-download-manager-support)
25 25
  * [Self-Signed SSL Server](#user-content-self-signed-ssl-server)
26
+ * [RNFetchBlob as Fetch](#user-content-rnfetchblob-as-fetch)
26 27
 * [File System](#user-content-file-system)
27 28
  * [File access](#user-content-file-access)
28 29
  * [File stream](#user-content-file-stream)
@@ -332,7 +333,7 @@ Elements have property `filename` will be transformed into binary format, otherw
332 333
   })
333 334
 ```
334 335
 
335
-What if you want to upload a file in some field ? Just like [upload a file from storage](#user-content-upload-a-file-from-storage) example, wrap `data` by `wrap` API (this feature is only available for `version >= v0.5.0`). On version >= `0.6.2`, it is possible to set custom MIME type when appending file to form data.
336
+What if you want to upload a file using form data ? Just like [upload a file from storage](#user-content-upload-a-file-from-storage) example, wrap `data` by `wrap` API (this feature is only available for `version >= v0.5.0`). On version >= `0.6.2`, it is possible to set custom MIME type when appending file to form data.
336 337
 
337 338
 ```js
338 339
 
@@ -413,7 +414,15 @@ task.cancel((err) => { ... })
413 414
 
414 415
 ```
415 416
 
416
-#### Android Media Scanner, and Download Manager Support
417
+### RNFetchBlob as Fetch
418
+
419
+0.9.0
420
+
421
+If you have existing code that uses `whatwg-fetch`(the official **fetch**), you don't have to change them after 0.9.0, just use fetch replacement. The difference between Official fetch and fetch replacement is, official fetch uses [whatwg-fetch](https://github.com/github/fetch) js library which wraps XMLHttpRequest polyfill under the hood it's a great library for web developers, however that does not play very well with RN. Our implementation is simply a wrapper of  RNFetchBlob.fetch and fs APIs, so you can access all the features we provide.
422
+
423
+[See document and examples](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API#fetch-replacement)
424
+
425
+### Android Media Scanner, and Download Manager Support
417 426
 
418 427
 If you want to make a file in `External Storage` becomes visible in Picture, Downloads, or other built-in apps, you will have to use `Media Scanner` or `Download Manager`.
419 428