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