浏览代码

Update README.md

wkh237 8 年前
父节点
当前提交
5ad368545f
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. 11
    2
      README.md

+ 11
- 2
README.md 查看文件

@@ -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