-
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
Description
See example at https://github.com/sindresorhus/got/blob/main/documentation/3-streams.md
import fs from "node:fs";
import fs from "node:fs";
import { promisify } from "node:util";
import HttpRecorder from "@gr2m/http-recorder";
import got from "got";
const pipeline = promisify(stream.pipeline);
HttpRecorder.enable()
// For POST, PUT, PATCH, and DELETE methods, `got.stream` returns a `stream.Writable`.
pipeline(
fs.createReadStream("test.txt"),
got.stream.post("http:/httpbin.org/post"),
process.stdout
);