Skip to content

Commit 0fb4652

Browse files
committed
Update README.md in src
1 parent a593df6 commit 0fb4652

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

src/README.md

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
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

5-
**[Please visit our Github for updated document](https://github.com/wkh237/react-native-fetch-blob)**
6-
75
**Why do we need this**
86

97
At this moment, React Native does not support `Blob` object yet, so if you're going to send/receive binary data via `fetch` API, that might not work as you expect. See [[fetch] Does fetch with blob() marshal data across the bridge?](https://github.com/facebook/react-native/issues/854).
@@ -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)
@@ -484,6 +483,20 @@ You can also grouping requests by using `session` API, and use `dispose` to remo
484483

485484
```
486485

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+
487500
---
488501

489502
## API
@@ -759,10 +772,14 @@ Connect `Media Scanner` and scan the file. see [Android Media Scanner, and Downl
759772

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

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+
762779
#### fileCache:boolean
763780
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}`.
764781
#### appendExt:string
765-
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.
766783
#### path:string
767784
When this property has value, `fetch` API will try to store response data in the path ignoring `fileCache` and `appendExt` property.
768785
#### addAndroidDownloads:object (Android only)
@@ -815,7 +832,7 @@ Statistic data of a file, see the following sample object.
815832

816833
### RNFetchBlobSession
817834

818-
A `session` is an object that helps you manage files. It simply main a list of file path and let you use `dispose()`to delete files in this session once and for all.
835+
A `session` is an object that helps you manage files. It simply maintains a list of file path and let you use `dispose()`to delete files in this session once and for all.
819836

820837
#### add(path:string):RNFetchBlobSession
821838
Add a file path to this session.
@@ -830,6 +847,7 @@ A `session` is an object that helps you manage files. It simply main a list of f
830847

831848
| Version | |
832849
|---|---|
850+
| 0.5.3 | Add API for access untrusted SSL server |
833851
| 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 |
834852
| 0.5.0 | Upload/download with direct access to file storage, and also added file access APIs |
835853
| 0.4.2 | Supports upload/download progress |
@@ -849,5 +867,5 @@ A `session` is an object that helps you manage files. It simply main a list of f
849867

850868
### Development
851869

852-
If you're interested in hacking this module, check our [development guide](https://github.com/wkh237/react-native-fetch-blob/wiki/Development-Guide), there might be some helpful information.
870+
If you're interested in hacking this module, check our [development guide](https://github.com/wkh237/react-native-fetch-blob/wiki/Home), there might be some helpful information.
853871
Please feel free to make a PR or file an issue.

0 commit comments

Comments
 (0)