Skip to main content

https()

This function is used to perform HTTPs requests, as an alternative to node-fetch.

Parameters​

ParameterTypeRequiredDescription
urlstringβœ…URL to request.
optionsHttpsOptions❌Options for Request.

Returns​

  • Promise<Buffer | object | string>

Throws​

  • PromiseRejectedResult - If request fails.

[JS] Example​

const {https} = require('simply-xp');

https("https://api.jena.systems")
.then(console.log) // Returns the response
.catch((err) => console.log(err)); // Returns the error