MCPcopy Index your code
hub / github.com/prometheus/client_python / do_GET

Method do_GET

prometheus_client/exposition.py:423–436  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

421 registry: Collector = REGISTRY
422
423 def do_GET(self) -> None:
424 # Prepare parameters
425 registry = self.registry
426 accept_header = self.headers.get('Accept')
427 accept_encoding_header = self.headers.get('Accept-Encoding')
428 params = parse_qs(urlparse(self.path).query)
429 # Bake output
430 status, headers, output = _bake_output(registry, accept_header, accept_encoding_header, params, False)
431 # Return output
432 self.send_response(int(status.split(' ')[0]))
433 for header in headers:
434 self.send_header(*header)
435 self.end_headers()
436 self.wfile.write(output)
437
438 def log_message(self, format: str, *args: Any) -> None:
439 """Log nothing."""

Callers

nothing calls this directly

Calls 3

_bake_outputFunction · 0.85
writeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected