httpsバージョン: v2.0
目次
https()
この関数は、node-fetch の代替として HTTPS リクエストを実行するために使用します。
パラメーター
Section titled “パラメーター”| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | ✅ | リクエスト先 URL。 |
| options | HttpsOptions | ❌ | リクエストのオプション。 |
- Promise<
Buffer | object | string>
PromiseRejectedResult- リクエストに失敗した場合。
[JS] 例
Section titled “[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