1.0.1 • Published 1 year ago
@kasterweb/http-stream-rn v1.0.1
Http Stream RN
Purpose
Downloads data from back-end using Range Requests and stream responses. Also, stores it locally in the device as a file.
Platforms | Minimum |
---|---|
Android | SDK 23 |
iOS | iOS 12.4 |
Installation
yarn install http-stream-rn
Usage
import { doHTTPRequest } from 'http-stream-rn';
API
DoHTTPRequest
This method is responsible for executing http range request and persisting the response in phone's native storage.
Typescript Definition
doHTTPRequest(params: IParams): Promise<'success' | 'exception'>
DeleteFile
This method is responsible for deleting saved file in phone's native storage.
Typescript Definition
deleteFile(fileName: string, isDeleted: (result: true | false) => void): void
License
MIT
1.0.1
1 year ago