mirror of
https://github.com/zigzap/zap.git
synced 2025-10-21 07:34:08 +00:00
Minor README & comment cosmetics
This commit is contained in:
parent
44ac2f2c3a
commit
a01c6146ec
3 changed files with 4 additions and 11 deletions
|
@ -1,7 +1,8 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const zap = @import("zap");
|
const zap = @import("zap");
|
||||||
|
|
||||||
/// A simple endpoint listening on the /error route that causes an error on GET requests, which gets logged to the response (=browser) by default
|
/// A simple endpoint listening on the /error route that causes an error on GET
|
||||||
|
/// requests, which gets logged to the response (=browser) by default
|
||||||
pub const ErrorEndpoint = @This();
|
pub const ErrorEndpoint = @This();
|
||||||
|
|
||||||
path: []const u8 = "/error",
|
path: []const u8 = "/error",
|
||||||
|
@ -11,9 +12,8 @@ pub fn get(_: *ErrorEndpoint, _: zap.Request) !void {
|
||||||
return error.@"Oh-no!";
|
return error.@"Oh-no!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unused:
|
||||||
pub fn post(_: *ErrorEndpoint, _: zap.Request) !void {}
|
pub fn post(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||||
// pub fn post(_: *ErrorEndpoint, _: zap.Request) !void {}
|
|
||||||
|
|
||||||
pub fn put(_: *ErrorEndpoint, _: zap.Request) !void {}
|
pub fn put(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||||
pub fn delete(_: *ErrorEndpoint, _: zap.Request) !void {}
|
pub fn delete(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||||
pub fn patch(_: *ErrorEndpoint, _: zap.Request) !void {}
|
pub fn patch(_: *ErrorEndpoint, _: zap.Request) !void {}
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
//! WIP: zap.App.
|
|
||||||
//!
|
|
||||||
//! - Per Request Arena(s) thread-local?
|
|
||||||
//! - Custom "State" Context, type-safe
|
|
||||||
//! - route handlers
|
|
||||||
//! - automatic error catching & logging, optional report to HTML
|
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
const ArenaAllocator = std.heap.ArenaAllocator;
|
const ArenaAllocator = std.heap.ArenaAllocator;
|
||||||
|
|
Loading…
Add table
Reference in a new issue