code wiki / (root) / nx_lib_http.nx

nx_lib_http.nx

buildroot/runtime/nx_lib_http.nx

6736 B163 linesdepth 6pulls 13 transitivereach 5 importersview sourcekind librarytopic lib
docsdependenciesstructsconstsfunctions

about

nx_lib_http.nx -- PURE HTTP routing/response for the sovereign library API. No main, no sockets: request-path -> full HTTP response bytes, straight from nx_lib_store via nx_lib_serve. Gateable in isolation; the daemon nx_lib_httpd wraps it with the socket accept loop. GET /api/works -> JSON array of work_hks GET /api/work/<hk> -> JSON work record (200) or 404 license_tier: ORIGINAL

dependencies 5 imports · 5 importers

nx_lib_serve.nx nx_lib_index.nx nx_lib_ingest.nx nx_lib_ingest_tsv.nx nx_lib_page.nx nx_lib_http.nx nx_lib_e2e_test.nx nx_lib_http_test.nx nx_lib_httpd.nx nx_lib_research_alias_gate.nx nx_lib_write_test.nx

imports: nx_lib_serve.nxnx_lib_index.nxnx_lib_ingest.nxnx_lib_ingest_tsv.nxnx_lib_page.nx

imported by: nx_lib_e2e_test.nxnx_lib_http_test.nxnx_lib_httpd.nxnx_lib_research_alias_gate.nxnx_lib_write_test.nx

structs

none

consts

none

functions

14func lhd_puts(buf: *u8, off: i64, s: *u8) -> i64
22func lhd_putdec(buf: *u8, off: i64, v: i64) -> i64
34func lhd_eq(path: *u8, path_n: i64, s: *u8) -> i64
called by 1: lhd_response calls 1: ls_strlen
42func lhd_starts(path: *u8, path_n: i64, pre: *u8) -> i64
53func lhd_response(path: *u8, path_n: i64, out: *u8) -> i64
148func lhd_ingest_response(body: *u8, body_n: i64, out: *u8) -> i64