UNPKG

react-native-fast-io

Version:

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

18 lines (17 loc) 457 B
"use strict"; import { Network } from "../native/network.nitro.js"; import { Blob } from "./blob.js"; import { File } from "./fs.js"; import { fromReadableStream } from "./streams.js"; export function fetch(url, { body, method }) { const nativeBody = body instanceof Blob || body instanceof File ? body.stream() : body; return Network.request({ method, url, body: fromReadableStream(nativeBody) }); } //# sourceMappingURL=fetch.js.map