Fetch & head

Guides: Fetch · Head.

Fetch (server-side)

ExportSignature
ctx.fetch(url, FetchOptions) !FetchResponse
FetchOptions{ method = .GET, body: ?[]const u8, content_type: ?[]const u8, extra_headers = &.{}, max_body = 1MB, timeout_ns: ?u64 }
FetchResponse{ status: u16, body: []u8 (arena), truncated: bool }
.json(comptime T) !T

WASM builds: error.UnsupportedOnClient — use server functions.

Head accumulator

ExportSignature
ctx.setTitle / setTitleIfUnset(t) !void — last writer wins / layout default
ctx.metaTag(HeadMeta{ .name, .content, .is_property = false, .priority }) !void — replace-by-name
ctx.linkTag(HeadLink{ .rel, .href, … }) !void
ctx.jsonLd(json) !void
Head.render(writer) !void — the shell drains in priority order

Head, HeadMeta, HeadLink, HeadScript are the public types. The accumulator always emits <meta charset> + <title>; everything else is contribution-ordered by priority.