メインコンテンツまでスキップ
バージョン: 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