MCPcopy Create free account
hub / github.com/bdring/FluidNC / do_GET

Method do_GET

examples/http_command/http_command_server.py:44–73  ·  view source on GitHub ↗

Handle GET requests

(self)

Source from the content-addressed store, hash-verified

42 """HTTP request handler supporting multiple endpoints"""
43
44 def do_GET(self):
45 """Handle GET requests"""
46 parsed_path = urlparse(self.path)
47 path = parsed_path.path
48
49 # Route to different handlers based on path
50 if path == '/api/status':
51 self.handle_status()
52 elif path == '/api/temperature':
53 self.handle_temperature()
54 elif path == '/api/humidity':
55 self.handle_humidity()
56 elif path == '/api/read':
57 self.handle_read()
58 elif path == '/api/health':
59 self.handle_health_detailed()
60 elif path.startswith('/api/states/'):
61 self.handle_home_assistant_state(path)
62 elif path == '/api/jobs/next':
63 self.handle_jobs_next()
64 elif path == '/api/v1/query':
65 self.handle_prometheus_query(parsed_path.query)
66 elif path.startswith('/metrics/'):
67 self.handle_metrics()
68 elif path == '/health':
69 self.handle_health()
70 elif path == '/':
71 self.handle_root()
72 else:
73 self.send_error(404, "Not Found")
74
75 def do_POST(self):
76 """Handle POST requests"""

Callers

nothing calls this directly

Calls 11

handle_statusMethod · 0.95
handle_temperatureMethod · 0.95
handle_humidityMethod · 0.95
handle_readMethod · 0.95
handle_jobs_nextMethod · 0.95
handle_metricsMethod · 0.95
handle_healthMethod · 0.95
handle_rootMethod · 0.95

Tested by

no test coverage detected