diff --git a/lib/log.js b/lib/log.js index f2c3791..bc80224 100644 --- a/lib/log.js +++ b/lib/log.js @@ -35,7 +35,7 @@ const logLine = (message, date) => { const logRequest = async ({ req, start, requestIndex, limit }) => { logLine(`> #${requestIndex} ${chalk.bold(req.method)} ${req.url}`, start) - if (req.headers['content-length'] > 0) { + if (req.headers['content-length'] > 0 && req.headers['content-type'] === 'application/json') { try { const parsedJson = await json(req, { limit }) jsome(parsedJson)