0

I have a zkteco WL30 device which can push attendance to a provided IP address. I have created a new nodejs-express project and added a POST endpoint to it to receive the data. I can successfully receive the request but not the data. Attendance data is completely missing from request object - neither in the body nor in data.

I have also tried using https://www.npmjs.com/package/zklib but it doesn't connect to the device. The included device software however successfully receive all data successfully.

Here is the node-express code I'm using -

const express = require('express')
const app = express();

app.post('/iclock/cdata.aspx', function(request, response) {
    response.send("OK\n");
});

app.get('/iclock/cdata.aspx', function(request, response) {
    response.headers["content-type"] = "text/plain";
    response.send("OK\n");
});

app.listen(3000, function() {console.log('Example app listening on port 3000!')});

Can anyone suggest a way of receiving attendance in nodejs application?

Harshil Sharma
  • 2,016
  • 1
  • 29
  • 54

0 Answers0