|
@@ -113,9 +113,22 @@ Beginning in Android 6.0 (API level 23), users grant permissions to apps while t
|
113
|
113
|
|
114
|
114
|
## Recipes
|
115
|
115
|
|
|
116
|
+ES6
|
|
117
|
+
|
|
118
|
+The module uses ES6 style export statement, simply use `import` to load the module.
|
|
119
|
+
|
116
|
120
|
```js
|
117
|
121
|
import RNFetchBlob from 'react-native-fetch-blob'
|
118
|
122
|
```
|
|
123
|
+
|
|
124
|
+ES5
|
|
125
|
+
|
|
126
|
+If you're using ES5 require statement to load the module, please add `default`. See [here](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting#rnfetchblobfetch-is-not-a-function) for more detail.
|
|
127
|
+
|
|
128
|
+```
|
|
129
|
+var RNFetchBlob = require('react-native-fetch-blob').default
|
|
130
|
+```
|
|
131
|
+
|
119
|
132
|
#### Download example : Fetch files that needs authorization token
|
120
|
133
|
|
121
|
134
|
```js
|