I'm trying to send a post xml request, but the body of the request is empty. using bodyParser I managed to transform the content type. But the backend expects a content-type: "text/xml" and in my request content-type: "application/x-www-form-urlencoded", even passing content-type: "text/xml". It's giving error 415.
How to send the body of the request with the text/xml type?
my bodyParser declaration:
const bodyParser = require("body-parser");
app.use(bodyParser.text({ type: "text/xml" }));