mirror of
https://github.com/skoelle/m5stack-dashboard.git
synced 2026-09-18 00:50:24 +00:00
improve ui
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
// Result of a GET request against one of the JSON APIs.
|
||||
struct ApiResult {
|
||||
bool success = false;
|
||||
String body;
|
||||
int httpCode = -1;
|
||||
};
|
||||
|
||||
// Performs a simple HTTP GET request with a timeout and returns the raw body.
|
||||
// Kept deliberately simple: no retries here, retry logic lives in the screens
|
||||
// (either via the regular refresh timer or a manual button press).
|
||||
ApiResult httpGet(const String &url, uint32_t timeoutMs = 5000);
|
||||
|
||||
Reference in New Issue
Block a user