mirror of
https://github.com/kmitresse/Compo-Service-Log-Project.git
synced 2026-05-14 01:21:48 +00:00
feat: Get json dataset from stream, convert into NudgerData, start to implement DMN concepts
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { NextFunction, Request, Response } from "express";
|
||||
|
||||
export default function (req: Request, res: Response, next: NextFunction) {
|
||||
if (req.is("application/xml")) {
|
||||
let data = "";
|
||||
req.setEncoding("utf8");
|
||||
req.on("data", (chunk: any) => {
|
||||
data += chunk;
|
||||
});
|
||||
req.on("end", () => {
|
||||
req.body = data;
|
||||
next();
|
||||
});
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user