can not parse no content-type body
demo code
const Koa = require('koa');
const bodyParser = require('koa-bodyparser');
const app = new Koa();
app.use(bodyParser({enableTypes: ['form', 'text'], extendTypes: {text: ['', undefined]}}));
app.use(async function() {
// the parsed body will store in this.request.body
this.body = this.request.body;
});
const PORT = process.env.PORT || 3000;
app.listen(PORT, () =>
console.log(`Server ready at http://localhost:${PORT} 🚀 ..`)
);
test request
curl --location --request POST 'http://127.0.0.1:3000' \
--header 'Content-Type: ' \
--data-raw 'text'
debug
parseBody first judge content type then parse it, but content type is undefined.
And I try extendTypes, but build-in typeis try fase when it is undefined

In some times, client request not standard, but as a server we will compatible it. sad 😭
why can you set a meaningful content-type header? or you can just use https://github.com/stream-utils/raw-body#simple-koa-example directly.
Because client request is another user, I cant not control It,But as a server we will compatible it.
I'm not sure, but we can add an option to enable support for the unknown request type as text. @dead-horse ?!
This issue opened for a long time and I think @iyaozhen followed at the end what @dead-horse mentioned, therefore I am closing this issue, and please feel free to re-open at anytime if you feel like you realy need this feature today!