https()
この関数は、node-fetch の代替として HTTPS リクエストを実行するために使用します。
パラメーター
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | ✅ | リクエスト先 URL。 |
| options | HttpsOptions | ❌ | リクエストのオプション。 |
戻り値
- Promise<
Buffer | object | string>
例外
PromiseRejectedResult- リクエストに失敗した場合。
[JS] 例
const {https} = require('simply-xp');
https("https://api.jena.systems")
.then(console.log) // Returns the response
.catch((err) => console.log(err)); // Returns the error