code wiki / (root) / nx_https_get_hdr.nx

nx_https_get_hdr.nx

buildroot/runtime/nx_https_get_hdr.nx

3483 B75 linesdepth 21pulls 146 transitivereach 0 importersview sourcekind tooltopic https
docsdependenciesstructsconstsfunctions

about

nx_https_get_hdr.nx -- generic sovereign HTTPS GET with a CALLER-SUPPLIED request header, over the FULL best-effort ladder (minimal TLS-1.3 hello -> Chrome-JA3 -> TLS-1.2), redirect-following + cookie jar. The header-capable twin of nx_https_get and the adoption vehicle for the 2026-08-12 header fold (nx_https_fetch_follow_hdr_best). Reaches an authed/Cloudflare API in ONE call: nx_https_get_hdr <url> "Authorization: Bearer <token>" (redgifs / reddit-OAuth) nx_https_get_hdr <url> "Cookie: over18=1" (pre-seeded age cookie) argv[1]=url (required), argv[2]=one header line (optional, sent verbatim + CRLF). NO curl/libc/fetch-shim. Structured refusal (reason+fix) on failure per feedback-refusals-carry-reason-and-fix. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_https_get_hdr.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main hgh_put sys_write hgh_slen sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ nx_trust_store_load_from_c sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal

structs

none

consts

13const HGH_MAGIC_8192: i64 = 8192
14const HGH_MAGIC_8189: i64 = 8189
16const HGH_OUTCAP: i64 = 4194304
17const HGH_CERTDATA: *u8 = "data/mozilla_certdata.txt" as *u8

functions

19func hgh_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: hgh_put
20func hgh_put(fd: i64, s: *u8) -> i64 { sys_write(fd, s, hgh_slen(s)); return 0 }
called by 1: main calls 2: sys_writehgh_slen
21func hgh_putn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
35func main(argc: i64, argv: *i64) -> i64