
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
react-native-http-cus
Advanced tools
http请求,上传文件,下载文件
npm i --save react-native-http-cus
npm i --save react-native-fs 文件操作
import Http from "react-native-http-cus";
Http.post();//基于 fetch 封装的 POST请求
Http.get();//基于 fetch 封装的 Get请求
Http.requestAjax();//基于 ajax 封装的 网络请求
Http.urlFile = "";//上传文件 接口
Http.fileField = "";//文件上传包含文件的字段,可不传
Http.setRNFS();//设置react-native-fs文件组件对象
Http.upLoadFileToService();//上传文件 react-native-fs
Http.downloadFile();//下载文件 react-native-fs
import RNFS from " react-native-fs";
import Http from "react-native-http-cus";
//请求接口
Http.post("接口地址",{ff:"dd"})
.then(result=>{});//基于 fetch 封装的 POST请求
Http.get("接口地址",{ff:"dd"})
.then(result=>{});//基于 fetch 封装的 Get请求
Http.requestAjax("接口地址",{ff:"dd"})
.then(result=>{});//基于 ajax 封装的 网络请求
//上传文件,下载文件
Http.urlFile = "http://";//上传文件 接口
Http.fileField = "ff";//文件上传包含文件的字段,可不传
Http.setRNFS(RNFS);//设置react-native-fs文件组件对象
Http.upLoadFileToService([{localPath:'文件路径'}])
.then(result=>{});//上传文件 react-native-fs
Http.downloadFile("文件下载地址")
.then(result=>{});//下载文件 react-native-fs
FAQs
http请求,上传文件,下载文件
The npm package react-native-http-cus receives a total of 3 weekly downloads. As such, react-native-http-cus popularity was classified as not popular.
We found that react-native-http-cus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.