code wiki / _hdl_build / nx_apistack_content.nx

nx_apistack_content.nx

buildroot/runtime/_hdl_build/nx_apistack_content.nx

1329 B23 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic apistack
docsdependenciesstructsconstsfunctions

about

nx_apistack_content.nx -- CAP-API-CONTENT: content-negotiation for /api. Reads the Accept header and picks the first SUPPORTED media type the client accepts (or -1 => 406 Not Acceptable). "*/*" matches the first supported. Deterministic serializer selection = the sovereign exceed over ad-hoc fixed Content-Type. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_apistack_content.nx nx_apistack_content_gate.nx

imports: nx_syscalls.nx

imported by: nx_apistack_content_gate.nx

structs

none

consts

none

functions

6func cn_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: cn_contains
7func cn_contains(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: cn_accepts calls 1: cn_len
13func cn_accepts(accept: *u8, accept_n: i64, media: *u8) -> i64
called by 2: cn_choosemain calls 1: cn_contains
19func cn_choose(accept: *u8, accept_n: i64, supported: *i64, n: i64) -> i64
called by 1: main calls 1: cn_accepts