Closed apttap closed 1 month ago
24.6.1
Ubuntu 22.04 LTS, openjdk version "11.0.23" 2024-04-16
The documentation states that for a shutdown command it should return a json reponse of:
{ "result": 'ok' }
curl yields an empty reponse, and fetch or axios.post yields an error
curl
fetch
axios.post
$ curl -X POST http://localhost:2480/api/v1/server \ -d '{ "command": "shutdown" }' \ -H "Content-Type: application/json" \ --user root:arcadedb-password
will yield: curl: (52) Empty reply from server
curl: (52) Empty reply from server
or a post from axios (nodejs):
axios .post("http://localhost:2480/api/v1/server", { "command": "shutdown", }, { headers: { Authorization: `Basic ${Buffer.from("root:arcadedb-password").toString('base64')}` } }) .then((res)=>console.log(res.data));
will throw an exception
as will a fetch (nodejs):
fetch("http://localhost:2480/api/v1/server", { method: "POST", headers: { Authorization: `Basic ${Buffer.from("root:arcadedb-password").toString('base64')}` }, body: JSON.stringify({"command": "shutdown"}), }) .then(console.log);
Now the shutdown is executed on a different thread and the command returns "ok".
ArcadeDB Version:
24.6.1
OS and JDK Version:
Ubuntu 22.04 LTS, openjdk version "11.0.23" 2024-04-16
Expected behavior
The documentation states that for a shutdown command it should return a json reponse of:
{ "result": 'ok' }
Actual behavior
curl
yields an empty reponse, andfetch
oraxios.post
yields an errorSteps to reproduce
will yield:
curl: (52) Empty reply from server
or a post from axios (nodejs):
will throw an exception
as will a fetch (nodejs):