メインコンテンツまでスキップ
バージョン: v2.0

https()

この関数は、node-fetch の代替として HTTPS リクエストを実行するために使用します。

パラメーター

ParameterTypeRequiredDescription
urlstringリクエスト先 URL。
optionsHttpsOptionsリクエストのオプション。

戻り値

  • 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