aotrautils-srv 0.0.790 → 0.0.792
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (15/02/2024-00:05:11)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -5167,7 +5167,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5167
5167
|
|
|
5168
5168
|
|
|
5169
5169
|
|
|
5170
|
-
/*utils SERVER library associated with aotra version : «1_29072022-2359 (
|
|
5170
|
+
/*utils SERVER library associated with aotra version : «1_29072022-2359 (15/02/2024-00:05:11)»*/
|
|
5171
5171
|
/*-----------------------------------------------------------------------------*/
|
|
5172
5172
|
|
|
5173
5173
|
|
|
@@ -6851,7 +6851,7 @@ performHTTPRequestNode=function(completeURL,httpMethod="GET",headers={},postRequ
|
|
|
6851
6851
|
|
|
6852
6852
|
if(!require){
|
|
6853
6853
|
// TODO : FIXME : Support also a browser context!!
|
|
6854
|
-
lognow("ERROR :
|
|
6854
|
+
lognow("ERROR : require() not found, this may need we are not running in a nodejs context. This is currently not supported. Aborting");
|
|
6855
6855
|
throw new Error("Unsupported context non-nodejs for performHTTPRequestNode().");
|
|
6856
6856
|
}
|
|
6857
6857
|
|
|
@@ -6873,7 +6873,7 @@ performHTTPRequestNode=function(completeURL,httpMethod="GET",headers={},postRequ
|
|
|
6873
6873
|
|
|
6874
6874
|
options.headers=headers;
|
|
6875
6875
|
|
|
6876
|
-
return new Promise((
|
|
6876
|
+
return new Promise((resolve,reject)=>{
|
|
6877
6877
|
|
|
6878
6878
|
// Create the HTTP request
|
|
6879
6879
|
const request = httpHandler.request(options, (response) => {
|
|
@@ -6881,18 +6881,18 @@ performHTTPRequestNode=function(completeURL,httpMethod="GET",headers={},postRequ
|
|
|
6881
6881
|
let responseData = "";
|
|
6882
6882
|
|
|
6883
6883
|
// A chunk of data has been received.
|
|
6884
|
-
response.on(
|
|
6884
|
+
response.on("data", (chunk) => {
|
|
6885
6885
|
responseData += chunk;
|
|
6886
6886
|
});
|
|
6887
6887
|
|
|
6888
6888
|
// The whole response has been received.
|
|
6889
|
-
response.on(
|
|
6889
|
+
response.on("end", () => {
|
|
6890
6890
|
resolve(responseData);
|
|
6891
6891
|
});
|
|
6892
6892
|
});
|
|
6893
6893
|
|
|
6894
6894
|
// Handle errors
|
|
6895
|
-
request.on(
|
|
6895
|
+
request.on("error", (error) => {
|
|
6896
6896
|
reject(error);
|
|
6897
6897
|
});
|
|
6898
6898
|
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.792",
|
|
4
4
|
"main": "aotrautils-srv.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|