Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 0bf1ae8

Browse files
committed
Update README.md
1 parent c3cc1dd commit 0bf1ae8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# react-native-fetch-blob [![npm version](https://badge.fury.io/js/react-native-fetch-blob.svg)](https://badge.fury.io/js/react-native-fetch-blob)
22

3-
Since react-native `fetch` API [does not marshals `Blob` data in request/response
4-
body](https://github.com/facebook/react-native/issues/854), I made this plugin which send/receive HTTP request/response that have `Blob` body content.
3+
A react-native module for fetch file/image with custom headers, supports blob response data.
54

6-
This plugin simply convert given base64 string into blob format and send the request in a new thread. The process is done in native code, it supports both Android (uses awesome library [AsyncHttpClient](https://github.com/AsyncHttpClient/async-http-client])) and IOS.
5+
If you're dealing with image or file server that requires an `Authorization` token in the header, or you're having problem with `fetch` API when receiving blob data, you might try this module (this is also the reason why I made this plugin).
76

8-
If you're dealing with image or file server that requires an `Authorization` token in the header, you might try this plugin (this is also the reason why I made this plugin), the source code is very simple, just an implementation of native HTTP request.
7+
This module enables you upload/download binary data in js, see [Examples](#user-content-usage) bellow.
8+
9+
The source code is very simple, just an implementation of native HTTP request, supports both Android (uses awesome native library [AsyncHttpClient](https://github.com/AsyncHttpClient/async-http-client])) and IOS.
910

1011

1112
* [Installation](#user-content-installation)
@@ -48,7 +49,6 @@ RNFetchBlob.fetch('GET', 'http://www.example.com/images/img1.png', {
4849
// the conversion is done in native code
4950
let base64Str = res.base64()
5051
// the following conversions are done in js, it's SYNC
51-
let blob = res.blob()
5252
let text = res.text()
5353
let json = res.json()
5454

@@ -61,7 +61,7 @@ RNFetchBlob.fetch('GET', 'http://www.example.com/images/img1.png', {
6161

6262
#### Upload example : Dropbox [files-upload](https://www.dropbox.com/developers/documentation/http/documentation#files-upload) API
6363

64-
`react-native-fetch-blob` will convert the base64 string in `body` to binary format in native code.
64+
`react-native-fetch-blob` will convert the base64 string in `body` to binary format using native API, this process will be done in a new thread, so it's async.
6565

6666
```js
6767

0 commit comments

Comments
 (0)