feat: serve static files, relay example
This commit is contained in:
@@ -29,6 +29,9 @@ public:
|
||||
std::function<void(AsyncWebServerRequest*, const String&, size_t, uint8_t*, size_t, bool)> uploadHandler,
|
||||
const std::vector<ParamSpec>& params);
|
||||
|
||||
// Static file serving
|
||||
void serveStatic(const String& uri, fs::FS& fs, const String& path, const String& cache_header = "");
|
||||
|
||||
static const char* methodToStr(int method);
|
||||
|
||||
// Access to endpoints for endpoints endpoint
|
||||
|
||||
@@ -15,10 +15,4 @@ private:
|
||||
static const String name;
|
||||
NodeContext& ctx;
|
||||
ApiServer& apiServer;
|
||||
|
||||
void handleRootRequest(AsyncWebServerRequest* request);
|
||||
void handleStaticFileRequest(AsyncWebServerRequest* request);
|
||||
void handleNotFound(AsyncWebServerRequest* request);
|
||||
String getContentType(const String& filename);
|
||||
bool fileExists(const String& path);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user