with fiddler Im creating post message with header
content-Type application/text-enriched
app.post('/books',function(req,res){
var writeStream = fs.createWriteStream('C://Books.txt' ,{ flags : 'w' });
writeStream.write(req.body)
I was able to stops in debug in var writestream but when i excute this line I got error Entity is too large
there is some technique to overcome this problem? I wanted just to send large text file...
after reading some posts I've added the following which doesnt help...
var bodyParser = require('body-parser');
app.use( bodyParser.json({limit: '2mb'}) );
app.use(bodyParser.urlencoded({
extended: true,
keepExtensions: true,
limit: '2mb',
defer: true
}));
UPDATE
I've also tried with the following
app.use(bodyParser.raw({ type: 'application/text-enriched' }));
app.use( bodyParser.raw({limit: '10mb'}) );
app.use(bodyParser.urlencoded({
extended: true,
keepExtensions: true,
limit: '10mb',
defer: true
}));
also got the same error...413 Request Entity Too Large
According to the body-parser documentation, you have to configure it regarding the content-type of your request. In your case, something like
or may be text