summaryrefslogtreecommitdiff
path: root/backend/src/Handler.zig
diff options
context:
space:
mode:
authorphyscik <mynameisgennadiy@vk.com>2026-04-15 13:26:45 +0500
committerphyscik <mynameisgennadiy@vk.com>2026-04-15 13:26:45 +0500
commitf8e6072f8713f79926fa97092ee8b269109fc696 (patch)
treef9500788ad25cf9eeb493e13082634bb72cae962 /backend/src/Handler.zig
parent008de5f8a319f253ed5807160dc288855b1b6207 (diff)
Middleware handler
Diffstat (limited to 'backend/src/Handler.zig')
-rw-r--r--backend/src/Handler.zig9
1 files changed, 9 insertions, 0 deletions
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});
+ }
+};