
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
https.requestでPromiseを使う - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
https.requestでPromiseを使う - Qiita
$ node -v v16.2.0 $ yarn info jsdom version 16.6.0 $ yarn info https version 1.0.0 $ yarn info ty... $ node -v v16.2.0 $ yarn info jsdom version 16.6.0 $ yarn info https version 1.0.0 $ yarn info typescript version 4.3.2 import * as https from "https"; const request = (options) => { return new Promise((resolve, reject) => { https .request(options, (res) => { const data = []; res.on("data", (d) => data.push(d)); res.on("end", () => resolve(data.join(""))); }) .on("error", reject) .end(); }); }; im