1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-21 07:34:08 +00:00
Commit graph

19 commits

Author SHA1 Message Date
Rene Schallner
d17436932d fix test-sendfile (std.http use) 2024-04-21 17:38:06 +02:00
Rene Schallner
0e43f565ec fix test-httpparams (std.http use) 2024-04-21 16:22:51 +02:00
Rene Schallner
90c544d69a fix test-authentication (std.http use) 2024-04-21 16:20:07 +02: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
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
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
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
Brook Jeynes
9cc371e567 - Updated tests (all passing)
- Resolved `init()`  comment stating an error occured if nothing was passed in.
- Replaced error at an unreachable location in `init()` to `unreachable`
- Made many members private
2023-12-31 10:27:13 +10: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
Rene Schallner
82323f835e 0.12.0 ready 2023-12-29 23:34:33 +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
b988454a72 added example for sendFile 2023-05-13 22:30:45 +02:00
Rene Schallner
48e30ca35c feature: SimpleRequest.sendFile(filename) 2023-05-12 23:50:22 +02:00
Rene Schallner
645db5c8d0 AuthResult is now an enum (was: bool) 2023-05-08 00:06:57 +02:00
Rene Schallner
d0be271337 Mega update! SimpleHttpRequest got Parameters!
parseBody() : parse form params
parseQuery() : parse query params
getParamCount() : returns number of parsed params
parametersToOwnedStrList() : get params as kv pairs of strings
parametersToOwnedList() : get params as kv list
getParamStr() : get parameter by name
2023-05-06 02:38:35 +02:00