UNPKG

react-native-fast-io

Version:

Modern IO for React Native, built on top of Nitro and Web standards

22 lines (21 loc) 568 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fetch = fetch; var _networkNitro = require("../native/network.nitro.js"); var _blob = require("./blob.js"); var _fs = require("./fs.js"); var _streams = require("./streams.js"); function fetch(url, { body, method }) { const nativeBody = body instanceof _blob.Blob || body instanceof _fs.File ? body.stream() : body; return _networkNitro.Network.request({ method, url, body: (0, _streams.fromReadableStream)(nativeBody) }); } //# sourceMappingURL=fetch.js.map