nx_http_post.nx
buildroot/runtime/nx_http_post.nx
about
nx_http_post.nx -- sovereign HTTP POST probe (retires Invoke-WebRequest -Method POST for login/api flow tests).
Composes nx_http_client's POST request builder + sockaddr, plus a read-to-EOF drain. Usage:
nx_http_post <path> <body> [expect-substring] [port]
Content-Type application/x-www-form-urlencoded. Prints "POST <path> -> status=<code> bytes=<n>" + FOUND/MISSING.
No shell. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_http_client.nxnx_connect.nxnx_gate.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const K_MAGIC_8080: i64 = 8080 |
| 10 | const K_MAGIC_8192: i64 = 8192 |
| 11 | const K_MAGIC_4194304: i64 = 4194304 |
functions
| 13 | func hp_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 14 | func hp_atoi(buf: *u8, off: i64, len: i64) -> i64 { var v: i64=0; var i: i64=0; while i<len { let d: i64=buf[off+i] as i64; if d>=48 { if d<=57 { v=v*10+(d-48) } else { i=len } } else { i=len } i=i+1 } return v } called by 1: main |
| 15 | func hp_contains(buf: *u8, n: i64, needle: *u8) -> i64 { var nl: i64=0; while needle[nl]!=(0 as u8){nl=nl+1} if nl==0 {return 1} var i: i64=0; while i+nl<=n { var m: i64=1; var j: i64=0; while j<nl { if buf[i+j]!=needle[j] {m=0;j=nl} else {j=j+1} } if m==1 {return 1} i=i+1 } return 0 } called by 1: main |
| 16 | func hp_drain(fd: i64, buf: *u8, cap: i64) -> i64 { var off: i64=0; var go: i64=1; while go==1 { if off>=cap { go=0 } else { let r: i64=sys_read(fd, ((buf as i64)+off) as *u8, cap-off); if r<=0 { go=0 } else { off=off+r } } } return off } |
| 18 | func main(argc: i64, argv: *i64) -> i64 |