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

Commit d86e49a

Browse files
committed
Change README.md
1 parent ee6a0dc commit d86e49a

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# react-native-fetch-blob [![npm version](https://img.shields.io/badge/npm package-0.5.2-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)
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)
22

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

@@ -26,6 +26,7 @@ This update is `backward-compatible` generally you don't have to change existing
2626
* [File access](#user-content-file-access)
2727
* [File stream](#user-content-file-stream)
2828
* [Manage cached files](#user-content-manage-cached-files)
29+
* [Self-Signed SSL Server](#user-content-selfsigned-ssl-server)
2930
* [API](#user-content-api)
3031
* [config](#user-content-configoptionsrnfetchblobconfigfetch)
3132
* [fetch](#user-content-fetchmethod-url-headers-bodypromisefetchblobresponse)
@@ -482,6 +483,20 @@ You can also grouping requests by using `session` API, and use `dispose` to remo
482483

483484
```
484485

486+
#### Self-Signed SSL Server
487+
488+
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`
489+
490+
```js
491+
RNFetchBlob.config({
492+
trusty : true
493+
})
494+
.then('GET', 'https://mysite.com')
495+
.then((resp) => {
496+
// ...
497+
})
498+
```
499+
485500
---
486501

487502
## API
@@ -757,10 +772,14 @@ Connect `Media Scanner` and scan the file. see [Android Media Scanner, and Downl
757772

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

775+
#### trusty:boolean
776+
`0.5.3`
777+
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.
778+
760779
#### fileCache:boolean
761780
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}`.
762781
#### appendExt:string
763-
Set this propery to change temp file extension that created by `fetch` response data.
782+
Set this property to change temp file extension that created by `fetch` response data.
764783
#### path:string
765784
When this property has value, `fetch` API will try to store response data in the path ignoring `fileCache` and `appendExt` property.
766785
#### addAndroidDownloads:object (Android only)
@@ -828,6 +847,7 @@ A `session` is an object that helps you manage files. It simply main a list of f
828847

829848
| Version | |
830849
|---|---|
850+
| 0.5.3 | Add API for access untrusted SSL server |
831851
| 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 |
832852
| 0.5.0 | Upload/download with direct access to file storage, and also added file access APIs |
833853
| 0.4.2 | Supports upload/download progress |

0 commit comments

Comments
 (0)