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

121 commits

Author SHA1 Message Date
dweiller
43b6993942 update for @fieldParentPointer RLS change 2024-04-05 15:13:44 +11:00
Rene Schallner
b2f4e29258 re-write of zap.Router, fix #83 2024-03-23 22:35:49 +01:00
Rene Schallner
8cf48ddfc1 zig master: exit, get_env fixes 2024-03-23 22:23:13 +01:00
Rene Schallner
6d710ba448 use methodAsEnum() in endpoint and json example 2024-02-24 15:52:27 +01:00
Rene Schallner
5ea15b8a3e performance: revert r.method enum back to ?[]const u8 new http.Method enum is available via r.methodAsEnum() 2024-02-24 15:49:14 +01:00
Joe Liotta
4393866ea5 fixed unneeded optional unwrap in hello_json 2024-02-23 20:21:24 +01:00
Rene Schallner
1f6e945c08 cosmetics 2024-02-23 20:21:11 +01:00
Rene Schallner
680e981d13 access raw query params w/o allocator, close #40 2024-02-23 20:20:58 +01:00
Froxcey
694b3196db Use custom method enum 2024-02-23 20:20:00 +01:00
Froxcey
39ee26f9a4 Use std.http.Method for Request.method 2024-02-23 20:16:44 +01:00
Rene Schallner
bd1fbaee80 minor simple_router fixes 2024-01-24 22:59:38 +01:00
Rene Schallner
fa4acdf954 fix router constness for current zig 2024-01-24 14:10:07 +01:00
stringnick
508b1a12c0 some refactoring 2024-01-24 13:59:36 +01:00
stringnick
2c2814144e simple router with clojure 2024-01-24 13:59:36 +01:00
Rene Schallner
07c74e757d Refactored request, auth, endpoint:
- zap.Request : refactored into its own file, along with supporting
  types and functions (e.g. http params related)
    - added setContentTypeFromFilename thx @hauleth.
- zap.Auth : zap.Auth.Basic, zap.Auth.BearerSingle, ...
- zap.Endpoint : zap.Endpoint, zap.Endpoint.Authenticating
2024-01-10 15:05:53 +01:00
Rene Schallner
214cfc5dee example comments 2024-01-09 16:01:53 +01:00
Rene Schallner
652f0e2277 Merge branch 'api_clean' into zig-0.12.0 2024-01-09 12:12:46 +01:00
Rene Schallner
737691581a added setContentTypeFromFilename thx @hauleth. 2024-01-09 12:00:56 +01:00
Rene Schallner
724ce87bd2 don't pollute global namespace with fio 2024-01-09 11:07:07 +01:00
Rene Schallner
eca4d511f0 finalize: allocator always 1st-ish arg 2024-01-09 10:55:27 +01:00
renerocksai
551d033edc API cleanup #2
--------------

- Middleware: no more MixContexts
    - zig structs are fine
- more documentation (comments -> autodoc).
- websocket docs
2024-01-08 19:26:16 +01:00
renerocksai
3d651229f8 API cleanup #1
--------------

- EndpointListener.register() // was: addEndpoint
- no more Simple
- getEndpoint -> endpoint()
2024-01-08 15:50:46 +01:00
Rene Schallner
5082eebd74
Merge pull request #58 from BrookJeynes/mustache-zig-style
Updated `mustache.zig` to be more Zig like
2023-12-31 01:33:53 +01:00
stringnick
1e849d2b05 http method options support 2023-12-31 01:20:54 +01:00
Rene Schallner
a8a8b537fe http_auth test: http client code "fix"; also: 1 use 1 worker instead of 0 explicitly 2023-12-31 00:51:22 +01:00
Brook Jeynes
9fd8c13b32 Updated mustache.zig to be more Zig like
- `mustache.zig` now returns a `Mustache` struct. This allows functions to be called
on the mustache instance, e.g. `zap.mustacheFree(mustache)` -> `mustache.free()`.
- Updated mustache example.
- Added doc strings to majority of mustache functions.
2023-12-30 13:15:07 +10:00
Rene Schallner
684ea8065b refactored zap.Tls 2023-12-30 03:48:36 +01:00
Rene Schallner
c38856d0e1 added zap.Tls, updated https example 2023-12-30 03:13:36 +01:00
Rene Schallner
82323f835e 0.12.0 ready 2023-12-29 23:34:33 +01:00
Rene Schallner
5e789ee87a added https example 2023-12-29 17:44:25 +01:00
Rene Schallner
877bd0eea2 refactored and simplified Mustache interface 2023-09-13 13:43:33 +02:00
sadbeast
8f5aa17109 Add MustacheLoad to support loading from file
According to the facil.io docs
(http://facil.io/0.7.x/fiobj_mustache#fiobj_mustache_new):

> By setting the filename argument even when the data argument exists,
> it will allow path resolution for partial templates. Otherwise, there
> is no way to know where to find the partial templates.

This will allow partial templates to work.

However, this also introduces a breaking change to the existing
MustacheNew function. This change makes it mirror the C version where it
accepts a MustacheLoadArgs struct instead of just the data.  That's also
a handy method to have, so I renamed that to MustacheData...maybe
there's a better name?
2023-09-13 13:22:23 +02:00
Rene Schallner
ecb06028d1 provided 2 bin files for bindataformpost example 2023-09-13 02:23:33 +02:00
Rene Schallner
942fb0f4a9 fixed multi-file upload 2023-09-13 02:11:16 +02:00
Rene Schallner
661c230c0f added support for multi-file form upload 2023-09-13 01:36:42 +02:00
Rene Schallner
5adf7d0e02 updated bindataformpost example 2023-09-12 19:16:31 +02:00
Rene Schallner
e55f6181f8 added example for bindataformpost 2023-09-12 18:58:34 +02:00
Rene Schallner
28b90c7b00 Endpoint example: /stop endpoint & leak detection 2023-07-03 15:54:26 +02:00
Ed Yu
22d4b80cb9 Update to use the new alignCast where the alignOf is not needed anymore 2023-06-26 20:11:34 -07:00
Ed Yu
c047d9dc9b Revert Context changes in middleware_with_endpoint by fixing middleware MixContexts 2023-06-22 11:57:55 -07:00
Ed Yu
71fb5d945e Update middleware_with_endpoint example with direct context 2023-06-21 20:44:05 -07:00
Ed Yu
cc0680d6e3 Update middleware example with direct context 2023-06-21 15:21:42 -07:00
Ed Yu
9c66dd4deb Update to new json parser api changes 2023-06-20 10:21:48 -07:00
Rene Schallner
2885b2642b Update to latest facil.io patch (cookie path) 2023-05-30 10:42:51 +02:00
Rene Schallner
d1da4ec3bc fix: setCookie in ReleaseXXX mode, spelling COOKIE 2023-05-29 18:19:25 +02:00
Rene Schallner
55f2bc427f UserPassSessionAuth: ephermal session token
generated token will be modulated by timestamp in nanoseconds.
2023-05-24 12:02:53 +02:00
Rene Schallner
48b399e056 fix mem leaks in UserPassSessionAuth 2023-05-24 01:28:04 +02:00
Rene Schallner
e5e657870e first cut of sendError 2023-05-22 05:17:21 +02:00
Rene Schallner
35144b195e zap.Middleware.EndpointHandler, r.get/setContext() 2023-05-20 03:16:02 +02:00
Ed Yu
3fb6a65e48 update endpoint example to the new json api 2023-05-18 20:54:16 -07:00