https()
This function is used to perform HTTPs requests, as an alternative to node-fetch.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | ✅ | URL to request. |
| options | HttpsOptions | ❌ | 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