handler(req, res) {
		if (req.url == this.opts.path) {
			try {
				const content = this.generatePrometheusResponse();

				const resHeader = {
					"Content-Type": "text/plain; version=0.0.4; charset=utf-8"
				};

				const compressing =
					req.headers["accept-encoding"] &&
					req.headers["accept-encoding"].includes("gzip");
				if (compressing) {
					resHeader["Content-Encoding"] = "gzip";
					zlib.gzip(content, (err, buffer) => {
						/* istanbul ignore next */
						if (err) {
							this.logger("Unable to compress response: " + err.message);
							res.writeHead(500);
							res.end(err.message);
						} else {
							res.writeHead(200, resHeader);
							res.end(buffer);
						}
					});
				} else {
					res.writeHead(200, resHeader);
					res.end(content);
				}
			} catch (err) {
				this.logger.error("Unable to generate Prometheus response", err);
				res.writeHead(500, http.STATUS_CODES[500], {});
				res.end();
			}
		} else {
			res.writeHead(404, http.STATUS_CODES[404], {});
			res.end();
		}
	}
HTTP request handler. Support GZip compressing.

@param {IncomingMessage} req
@param {ServerResponse} res
@memberof PrometheusReporter