// SERVER:
const bodyParser = require('body-parser')
var jsonParser = bodyParser.json({limit:1024*1024*10, type:'application/json'});
var urlencodedParser = bodyParser.urlencoded({ extended:true,limit:1024*1024*10,type:'application/x-www-form-urlencoded' });
app.use(jsonParser);
app.use(urlencodedParser);
//external:
app.use(bodyParser.urlencoded({extended: true}));
app.use(express.json());
//----------------------------------------------------------------------------
// AXIOS:
const request_config = {
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
data: buffer
};
axios.post("http://localhost:4000/api/speech", request_config)