mirror of
https://github.com/crosspoint-reader/crosspoint-reader.git
synced 2026-08-13 14:21:57 -07:00
Consolidates repeated IO, HTTP and error-handling logic across plugin/catalog and webserver code. Key changes: - lib/Epub/Epub.cpp: use extractItemToFile for cover extraction instead of manual write/read. - src/activities/plugins/PluginCatalogActivity.*: add FsHelpers, pick(), use decodeUriEscapes, introduce fail(), beginLoading(), substitutedHeaders(), openApiClient(), and centralize apiRequest; replace many duplicated header builds and error-state code. - src/activities/plugins/PluginInfoActivity.cpp: reserve() paragraphs/lines to reduce reallocations. - src/network/CrossPointWebServer.*: add streamFileToClient() and readJsonBody() to centralize file streaming and JSON body parsing; include ArduinoJson in header. Reduces duplication, improves robustness and minor perf gains.