code: function returnJSON(finalResp, res) {
      if (JSONformat === 'JSON') {
        res.set('Content-Type', `application/json; charset=${encoding}`);
        res.json(finalResp);
      } else {
        res.set('Content-Type', `text/plain; charset=${encoding}`);
        res.send(JSON.stringify(finalResp));
      }
    }
docs: Response Functions