How to limit payload size?
Is there a way to limit the payload size? E.g., if a particularly large JSON payload is sent to the (standalone) server, the server should stop after having read a set number of bytes and fail the request.
opts.req.on("data", (chunk) => {
console.log("Received chunk with size: ", chunk.size);
});