Simplify: request.on('data', chunk => { json += String(chunk); }); request.on('end', () => { by introducing an option.
Activity
jankeromnes commentedon Jun 5, 2017
Great idea! I agree that we should find a sensible way to refactor this request-reading boilerplate.
I'm not sure whether it's better to address this in Self API directly, or in the code using it (e.g. Janitor).