Payload too large 413

a year ago

Trying to post to my API hosted on railway about 20,000 records into my API at once, its saying it cant due of the payload being too large, what's the limit and how can i change it?

0 Replies

a year ago

4c2cf819-c7e8-4ee0-89d8-13086fc777fb


a year ago

tried reducing from 22,000 records to just 1000 but it still says payload too large


a year ago

Fixed it by using

const bodyParser = require('body-parser');

app.use(bodyParser.json({ limit: '50mb' }));
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));

a year ago

🙂


a year ago

glad you figured it out, was about to say that the html page returned would not be returned by railway