const { got } = require("got-cjs");
const devnull = require("dev-null");
const { pipeline } = require("stream/promises");
const gotStream = got("https://google.com", { isStream: true });
const nullStream = devnull();
gotStream.on("response", () => gotStream.destroy());
await pipeline(gotStream, nullStream);