Commit 38160451 authored by Omar Elkadi's avatar Omar Elkadi
Browse files

add HTTP data reciver on /pdata route

parent c91a4f65
......@@ -15,6 +15,7 @@ export class dataRoutes {
routes() {
console.log("Data routes");
this.router.get("/data", this.get); // get data
this.router.post('/pdata', this.post)
}
get(req: Request, res: Response) {
......@@ -36,4 +37,10 @@ export class dataRoutes {
res.status(200).send(td); // respond with data in array
});
}
post(req: Request, res: Response) {
let body = req.body;
console.log(body);
res.status(200).send(body)
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment