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

View File

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