Keep getting the error "request entity too large (413)"
Does restify have an option to specify the max body size? I keep getting the error "request entity too large".
I'm using restify's version 4.3.0
Neither of the following parsers seem to be working -
server.use(restify.plugins.acceptParser(server.acceptable));
server.use(restify.plugins.authorizationParser());
server.use(restify.plugins.dateParser());
server.use(restify.plugins.queryParser());
server.use(restify.plugins.jsonp());
server.use(restify.plugins.gzipResponse());
server.use(restify.plugins.bodyParser());
//server.use(restify.plugins.requestExpiry());
server.use(restify.plugins.throttle({
burst: 100,
rate: 50,
ip: true,
overrides: {
'192.168.1.1': {
rate: 0, // unlimited
burst: 0
}
}
}));
server.use(restify.plugins.conditionalRequest());
and
server.use(restify.bodyParser())
server.use(restify.jsonBodyParser({
mapParams: true
}))
server.use(restify.urlEncodedBodyParser())
server.use(restify.bodyParser());
server.use(restify.acceptParser(server.acceptable))
server.use(restify.queryParser({
mapParams: true
}))
server.use(restify.fullResponse())
@puneeth8994 You can use maxBodySize with your bodyParser plugin.
Example:
server.use(restify.plugins.bodyParser({
maxBodySize: 1024
}));
@puneeth8994 let us know if that resolved your issue - feel free to reopen if that's the case.