Skip to content

release-0.0.13: Fixed Auth Ep cb ptr, Basic Auth += Authorization

Pre-release
Pre-release
Compare
Choose a tag to compare
@renerocksai renerocksai released this 01 May 04:16
· 478 commits to master since this release

ZAP Release release-0.0.13

Update and Fixes

  • Auth Endpoint now calls back with the correct *SimpleEndpoint so that callees' @fieldParentPtr can be used
  • Basic Authenticator now allows Authorization headers in addition to Authentication headers

Usage

To use in your own projects, put this dependency into your build.zig.zon:

        // zap release-0.0.13
        .zap = .{
            .url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.13.tar.gz",
            .hash = "1220c4c26d3ed0a6e27ff15d6165cfc648f6209b381e0e6ac06c02f68cf54a4c9fe4",
        }

Here is a complete build.zig.zon example:

.{
    .name = "My example project",
    .version = "0.0.1",

    .dependencies = .{
        // zap release-0.0.13
        .zap = .{
            .url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.13.tar.gz",
            .hash = "1220c4c26d3ed0a6e27ff15d6165cfc648f6209b381e0e6ac06c02f68cf54a4c9fe4",
        }
    }
}

Then, in your build.zig's build function, add the following before
exe.install():

    const zap = b.dependency("zap", .{
        .target = target,
        .optimize = optimize,
    });
    exe.addModule("zap", zap.module("zap"));
    exe.linkLibrary(zap.artifact("facil.io"));