added test for wssessions

main
alex 2023-02-06 00:20:36 +01:00
parent b6be47f812
commit a40d6a769b
3 changed files with 56 additions and 0 deletions

24
wssession/package-lock.json generated Normal file
View File

@ -0,0 +1,24 @@
{
"name": "test",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "test",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"uuid": "^9.0.0"
}
},
"node_modules/uuid": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==",
"bin": {
"uuid": "dist/bin/uuid"
}
}
}
}

14
wssession/package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "test.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"uuid": "^9.0.0"
}
}

18
wssession/test.js Normal file
View File

@ -0,0 +1,18 @@
const { v4: uuidv4 } = require('uuid');
function Call() {
let uuid = uuidv4()
console.log(uuid)
fetch("http://localhost:50000/v1/wsconnections/0446328d-9f16-4865-88bb-8ee022f47712/"+uuid,
{ method: "POST",
headers: {
"X-MS-API": "askmdaskdmasdklmasdlkm12km3alkmd"
},
})
.then((res) => res.text())
.then((data) => console.log(data))
}
Call()