zynagent-first application framework

Back to the API reference

zyn.Headers#

/// The inbound and outbound header fields used by response-capable request roles.
pub const Headers = struct {
    /// Returns the combined inbound request field matching `name`.
    pub fn get(self: Headers, name: []const u8) ?[]const u8;

    /// Sets or case-insensitively replaces an owned outbound response field.
    pub fn set(self: Headers, name: []const u8, value: []const u8) !void;

    /// Removes an outbound response field case-insensitively.
    pub fn remove(self: Headers, name: []const u8) void;
};