1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00
Commit graph

770 commits

Author SHA1 Message Date
renerocksai
0a582433a5
upgrade announceybot to 0.15.1 2025-08-28 19:45:13 +02:00
renerocksai
5c1fa416aa
fix build.zig: new 0.15.1 stdlib 2025-08-28 19:44:30 +02:00
Tesseract22
3c22e9dac5
chore: update to latest zig version
zig 0.15 introduced tons of breaking changes in the standard library,
fix them.
2025-08-28 17:47:44 +02:00
Rene Schallner
302f1e1e44
Merge pull request #174 from pollend/feature/tweak-support-cookies
feat: tweak support for additional cookie fields
2025-08-28 10:45:30 +02:00
Michael Pollind
512c630781 feat: tweak support for additional cookie fields
Signed-off-by: Michael Pollind <mpollind@gmail.com>
2025-08-10 18:59:27 -07:00
Rene Schallner
a953fc5969
Merge pull request #172 from pollend/feature/cookie-add-partition
feat: add parition support for cookies in facil.io
2025-08-07 10:31:01 +02:00
Michael Pollind
6174c3e5e0 feat: add parition support for cookies in facil.io
Signed-off-by: Michael Pollind <mpollind@gmail.com>
2025-08-06 21:12:08 -07:00
GitHub Action
a385bea1ed Update README 2025-07-25 00:00:57 +00:00
renerocksai
e1c973d5e2
bumped zon version 2025-07-25 01:59:02 +02:00
renerocksai
d9739599ec
added fio-typecheck of mimetype field when parsing binfiles 2025-07-25 01:59:02 +02:00
GitHub Action
66a7967aca Update README 2025-07-23 18:32:58 +00:00
renerocksai
e67b672977
fix zig version in README, bump zon version 2025-07-23 20:25:23 +02:00
renerocksai
dabd0637f9
endpoints, auth endpoints, middleware endpoints: eliminate need for empty stubs 2025-07-23 20:23:49 +02:00
renerocksai
baaa71d0e0
tests: fix non-overlapping ports during tests 2025-07-23 20:08:17 +02:00
renerocksai
6bdd5a41e4
exapmles/app/errors.zig: remove unnecessary empty stubs 2025-07-23 19:00:06 +02:00
GitHub Action
905b376c21 Update README 2025-07-23 00:26:09 +00:00
renerocksai
87415e1686
fix zon version 2025-07-23 02:23:56 +02:00
renerocksai
6105c2d4ed
bump zap version to non-confusing value 2025-07-23 02:22:39 +02:00
GitHub Action
ddcf3899c1 Update README 2025-07-23 00:10:46 +00:00
GitHub Action
0fc425a95d Update README 2025-07-23 00:06:39 +00:00
renerocksai
ef523d7767
zap.App.Endpoint.Authenticating: don't require unauthorized handler, return 405 method not allowed for unimplemented HTTP methods 2025-07-23 01:46:39 +02:00
Rene Schallner
29d339892e
Merge pull request #171 from Tesseract22/master
Provide defaults to unimplemented methods in endpoints for App style api.
2025-07-23 00:51:38 +02:00
Rene Schallner
35634a97cd
Merge pull request #167 from yanis-fourel/master
Accept file with no specified Content-Type
2025-07-23 00:47:08 +02:00
Rene Schallner
041ca3e301
Merge pull request #168 from QSmally/log-newline
Log: remove additional newlines due to Zig's default log fn
2025-07-23 00:38:45 +02:00
Tesseract22
c0cc025eda Provide defaults to unprovided restful method handler
Make `get`, `post`, ... methods optional. Check whether these method
exist at comptime. When no corresponding method is provided,
the handler simply return immediately.

Since it uses comptime, hopefully it should not add any checks at
runtime.
2025-07-13 15:02:35 +08:00
QSmally
fd567f3c29
Zap: remove newline for Zig's default log fn 2025-05-08 15:30:54 +02:00
Yanis Fourel
283e0d60d0 Add test_recvfile_notype.zig 2025-05-04 20:51:35 +08:00
Yanis Fourel
a7a904aea4 Add test_recvfile.zig 2025-05-04 20:51:35 +08:00
Yanis Fourel
4e1b50aca8 Accept file with no specified Content-Type 2025-05-04 14:31:39 +08:00
Rene Schallner
ec7cac6f6a
Merge pull request #164 from fwfurtado/hotfix/add-missing-head-handler-to-endpoints
fix: add missing head handler for EndpointType
2025-04-22 21:32:52 +02:00
Rene Schallner
f7cf3dd39f
Merge pull request #161 from unorsk/fix-readme-example
Fix hello world example in README.md
2025-04-22 21:25:58 +02:00
Mimi
b134f969f3 fix: add missing head handler for EndpointType 2025-04-21 18:36:46 -03:00
andrii
47ecb13d7b
Update README.md 2025-04-03 14:10:17 +02:00
renerocksai
8078b96d3f add on_uncaught_error behavior to zap.App, add on_error callbacks
zap.Endpont.Listener and zap.App now support on_error callbacks:

zap.Endpont.Listener.Settings contains an `on_error` optional callback
field.

zap.App supports those two callbacks:


/// ```zig
/// const MyContext = struct {
///     // You may (optionally) define the following global handlers:
///     pub fn unhandledRequest(_: *MyContext, _: Allocator, _: Request) anyerror!void {}
///     pub fn unhandledError(_: *MyContext, _: Request, _: anyerror) void {}
/// };
/// ```

The `endpoint` example has been updated to showcase `on_error`, and the
new example `app_errors` showcases `Context.unhandledError`.
2025-04-02 09:53:46 +02:00
renerocksai
4591f4048b change GH release workflow to produce non-prerelease releases 2025-04-01 16:46:23 +02:00
GitHub Action
295c525ec2 Update README 2025-04-01 14:41:53 +00:00
renerocksai
8d187310c7 harmonize callback function error handling, zap logging; doc updates 2025-04-01 16:30:24 +02:00
renerocksai
e93e45de42
fix spelling in README's shoutout to http.zig 2025-03-30 21:35:15 +02:00
renerocksai
24dfcbaeaa
update README's zig fetch because announceybot was overwhelmed
with the superlage release notes
2025-03-30 21:20:58 +02:00
renerocksai
337276fa52
update basic app example with stop endpoint 2025-03-30 21:16:51 +02:00
renerocksai
a01c6146ec
Minor README & comment cosmetics 2025-03-30 20:32:33 +02:00
renerocksai
44ac2f2c3a
fix typo in README. 2025-03-30 20:11:24 +02:00
renerocksai
3a2246ba50
cleanup unused params where applicable (ie non-instructive) 2025-03-30 19:58:22 +02:00
renerocksai
4c59132a08
added header to example main source files showing how to build & run 2025-03-30 19:40:08 +02:00
renerocksai
cc6d55fbf7
Improved & generalized checkEndpoint functions
E.g. return type's error set does not need to be `anyerror` anymore.
2025-03-30 19:37:40 +02:00
Rene Schallner
793423b7c2
Merge pull request #160 from zigzap/XXX
Breaking Niceties 😁 

- [x] Simplify zap.Endpoint
- [x] add error union to request fn return type
    - [x] add zap.Endpoint.ErrorStrategy 
- [x] maybe add `zap.App` 
    - [x] that's a bit like `zap.Midlleware` in the sense of supporting an arbitrary (app) context, 
    - [x] and provides an/a (per-thread) arena allocator per request for convenience 
    - [x] context-aware Endpoints
    - [x] context-aware Authenticating Endpoints
2025-03-30 15:09:03 +02:00
renerocksai
cce02dd9f3
fix README, gh workflow desc 2025-03-30 15:04:41 +02:00
renerocksai
43c411dcd7
fix router.zig type checking, remove wrk examples from build.zig 2025-03-30 15:03:35 +02:00
Rene Schallner
75c0cfdf02
Merge branch 'master' into XXX 2025-03-30 14:49:58 +02:00
renerocksai
307cc2f13e
remove legacy, update README 2025-03-30 14:46:08 +02:00