This commit is contained in:
Benjamin Toby 2024-07-13 11:53:35 +01:00
parent 14330465b9
commit dfbd4c3557

View File

@ -104,18 +104,23 @@ async function get({ key, db, query, queryValues, tableName }) {
}`;
}
/** @type {https.RequestOptions} */
const requestObject = {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: key,
},
port: localHostPort || 443,
hostname: localHost || "datasquirel.com",
path: encodeURIComponent(path),
};
console.log("requestObject =>", requestObject);
(scheme?.match(/^http$/i) ? http : https)
.request(
{
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: key,
},
port: localHostPort || 443,
hostname: localHost || "datasquirel.com",
path: encodeURIComponent(path),
},
requestObject,
/**
* Callback Function