1.0.1 • Published 1 year ago

@kasterweb/http-stream-rn v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.

PlatformsMinimum
AndroidSDK 23
iOSiOS 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