From f8e6072f8713f79926fa97092ee8b269109fc696 Mon Sep 17 00:00:00 2001 From: physcik Date: Wed, 15 Apr 2026 13:26:45 +0500 Subject: Middleware handler --- backend/src/Handler.zig | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 backend/src/Handler.zig (limited to 'backend/src/Handler.zig') diff --git a/backend/src/Handler.zig b/backend/src/Handler.zig new file mode 100644 index 0000000..0cee922 --- /dev/null +++ b/backend/src/Handler.zig @@ -0,0 +1,9 @@ +const std = @import("std"); +const httpz = @import("httpz"); + +pub const Handler = struct { + pub fn dispatch(self: *Handler, action: httpz.Action(*Handler), req: *httpz.Request, res: *httpz.Response) !void { + try action(self, req, res); + std.debug.print("{any} {s}\n", .{req.method, req.url.raw}); + } +}; -- cgit v1.3