UNPKG

phonic

Version:

[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPhonic-Co%2Fphonic-node) [![npm shield](htt

21 lines (20 loc) 937 B
import { ResponseWithBody } from "./ResponseWithBody.mjs"; export type BinaryResponse = { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */ bodyUsed: boolean; /** * Returns a ReadableStream of the response body. * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */ stream: () => ReadableStream<Uint8Array>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */ arrayBuffer: () => Promise<ArrayBuffer>; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */ blob: () => Promise<Blob>; /** * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) * Some versions of the Fetch API may not support this method. */ bytes?(): Promise<Uint8Array>; }; export declare function getBinaryResponse(response: ResponseWithBody): BinaryResponse;