body-parser-xml icon indicating copy to clipboard operation
body-parser-xml copied to clipboard

Integrate .xml method to express directly.

Open greg-md opened this issue 2 years ago • 1 comments

With latest versions of express, body-parser is integrated in the express itself and provides the same middleware (Docs: https://expressjs.com/en/api.html#express.json). It would be good to use Express middleware directly for xml as well, instead of body-parser.

Example:

const express = require('express');
require('body-parser-xml')(express);

const app = express();
app.use(express.xml());

greg-md avatar Dec 28 '22 09:12 greg-md

Sounds good. PRs welcome! 🙂

fiznool avatar Dec 28 '22 10:12 fiznool