| | |
| | | |
| | | /////// system //////////////////////////////////////////////////////////////// |
| | | |
| | | .post("/api/ping", async function (req, res) { |
| | | .get("/api/ping", async function (req, res) { |
| | | try { |
| | | const res2 = await libIlias.ping() |
| | | return res.send(res2) |
| | |
| | | |
| | | describe("using the API", function () { |
| | | |
| | | describe("the Route POST /api/ping", function () { |
| | | describe("the Route GET /api/ping", function () { |
| | | |
| | | it("should return an answer from php component", async function () { |
| | | const url = getUrl(ref_id) |
| | | console.log(url) |
| | | const res = await fetch(url, { |
| | | method: "POST", |
| | | method: "GET", |
| | | body: JSON.stringify({}), |
| | | headers: { |
| | | 'Content-Type': 'application/json', // Indicate JSON data |