feat(workflow): example covers security, platform, enterprise and resilience features
105 route tests, matrix crawl, spec and README updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,20 @@ void register_security_demo(fw::Router& router, Services& services) {
|
||||
return res;
|
||||
});
|
||||
|
||||
router.get("/uploads/file", "upload-list", [uploads](fw::Request req) {
|
||||
(void)req;
|
||||
std::string body = "{\"files\":[";
|
||||
bool first = true;
|
||||
for (const auto& u : uploads->list()) {
|
||||
body += std::string(first ? "" : ",") + "{\"file\":\"" +
|
||||
fw::json_escape(u.filename) + "\",\"size\":" +
|
||||
std::to_string(u.size) + "}";
|
||||
first = false;
|
||||
}
|
||||
return fw::JsonResponse(
|
||||
body + "],\"usage\":\"POST body to /uploads/file?filename=<name>\"}",
|
||||
200);
|
||||
});
|
||||
router.post("/uploads/file", "upload", [uploads](fw::Request req) {
|
||||
std::string filename = req.query_or("filename", "upload.txt");
|
||||
std::string content_type =
|
||||
|
||||
Reference in New Issue
Block a user