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

Commit ea4544b

Browse files
committed
Change README.md
1 parent 933e18e commit ea4544b

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# react-native-fetch-blob [![npm version](https://img.shields.io/badge/npm package-0.6.0-brightgreen.svg?style=flat-square)](https://badge.fury.io/js/react-native-fetch-blob?style=flat-square) ![](https://img.shields.io/badge/PR-Welcome-brightgreen.svg?style=flat-square)
2-
3-
# v0.6.0 WIP README.md
1+
# react-native-fetch-blob [![npm version](https://img.shields.io/badge/npm package-0.5.3-brightgreen.svg)](https://badge.fury.io/js/react-native-fetch-blob) ![](https://img.shields.io/badge/PR-Welcome-brightgreen.svg) ![](https://img.shields.io/badge/in progress-0.6.0-yellow.svg)
42

53
A module provides upload, download, and files access API. Supports file stream read/write for process large files.
64

@@ -28,6 +26,7 @@ This update is `backward-compatible` generally you don't have to change existing
2826
* [File access](#user-content-file-access)
2927
* [File stream](#user-content-file-stream)
3028
* [Manage cached files](#user-content-manage-cached-files)
29+
* [Self-Signed SSL Server](#user-content-selfsigned-ssl-server)
3130
* [API](#user-content-api)
3231
* [config](#user-content-configoptionsrnfetchblobconfigfetch)
3332
* [fetch](#user-content-fetchmethod-url-headers-bodypromisefetchblobresponse)
@@ -305,7 +304,7 @@ In `version >= 0.4.2` it is possible to know the upload/download progress.
305304

306305
#### Android Media Scanner, and Download Manager Support
307306

308-
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`.
307+
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`.
309308

310309
**Media Scanner**
311310

@@ -336,12 +335,12 @@ When download large files on Android it is recommended to use `Download Manager`
336335
RNFetchBlob
337336
.config({
338337
// Optional, if not specified, the file will download to system default path
339-
path : DOWNLOAD_DEST,
338+
path : DOWNLOAD_DEST,
340339
addAdnroidDownloads : {
341340
useDownloadManager : true, // <-- this is the only thing required
342341
// Optional, override notification setting (default to true)
343342
notification : false,
344-
// Optional, but recommended since android DownloadManager will fail when
343+
// Optional, but recommended since android DownloadManager will fail when
345344
// the url does not contains a file extension, by default the mime type will be text/plain
346345
mime : 'text/plain',
347346
description : 'File downloaded by download manager.'
@@ -508,6 +507,20 @@ You can also grouping requests by using `session` API, and use `dispose` to remo
508507

509508
```
510509

510+
#### Self-Signed SSL Server
511+
512+
By default, react-native-fetch-blob does NOT allow connection to unknown certification provider since it's dangerous. If you're going to connect a server with self-signed certification, add `trusty` to `config`. This function is available for version >= `0.5.3`
513+
514+
```js
515+
RNFetchBlob.config({
516+
trusty : true
517+
})
518+
.then('GET', 'https://mysite.com')
519+
.then((resp) => {
520+
// ...
521+
})
522+
```
523+
511524
---
512525

513526
## API
@@ -783,10 +796,14 @@ Connect `Media Scanner` and scan the file. see [Android Media Scanner, and Downl
783796

784797
A set of configurations that will be injected into a `fetch` method, with the following properties.
785798

799+
#### trusty:boolean
800+
`0.5.3`
801+
Set this property to `true` will allow the request create connection with server have self-signed SSL certification. This is not recommended to use in production.
802+
786803
#### fileCache:boolean
787804
Set this property to `true` will makes response data of the `fetch` stored in a temp file, by default the temp file will stored in App's own root folder with file name template `RNFetchBlob_tmp${timestamp}`.
788805
#### appendExt:string
789-
Set this propery to change temp file extension that created by `fetch` response data.
806+
Set this property to change temp file extension that created by `fetch` response data.
790807
#### path:string
791808
When this property has value, `fetch` API will try to store response data in the path ignoring `fileCache` and `appendExt` property.
792809
#### addAndroidDownloads:object (Android only)
@@ -854,6 +871,7 @@ A `session` is an object that helps you manage files. It simply maintains a list
854871

855872
| Version | |
856873
|---|---|
874+
| 0.5.3 | Add API for access untrusted SSL server |
857875
| 0.5.2 | Fix improper url params bug [#26](https://github.com/wkh237/react-native-fetch-blob/issues/26) and change IOS HTTP implementation from NSURLConnection to NSURLSession |
858876
| 0.5.0 | Upload/download with direct access to file storage, and also added file access APIs |
859877
| 0.4.2 | Supports upload/download progress |

0 commit comments

Comments
 (0)