#pragma once #include #include namespace svapi { // Parse a request body as JSON; throws ApiError(BadRequest) on failure. nlohmann::json bodyJson(const httplib::Request& req); // Serialize and send a JSON response with the given status. void sendJson(httplib::Response& res, int status, const nlohmann::json& body); } // namespace svapi