Import with #import "std/net_http_curl_linux".
CurlInitRoutine :: #type ()CurlUrl :: 10002CurlMethod :: 10036CurlWriteData :: 10001CurlWriteFunction :: 20011CurlHeaders :: 10023CurlAcceptEncoding :: 10102CurlPostFields :: 10015CurlPostSize :: 30120CurlTimeoutMs :: 155CurlConnectTimeoutMs :: 156CurlNoSignal :: 99CurlNoBody :: 44CurlProxy :: 10004CurlFollowLocation :: 52CurlResponseCode :: 2097154CurlMaxConnects :: 71CurlPoolSlot :: struct { handle: *void; origin: [512]u8; direct: bool; busy: bool; }CurlLease :: struct { handle: *void; slot: s32; }curl_pool: [4]CurlPoolSlotcurl_once: s32curl_init_result: s32curl_pool_lock: [8]u64LockCurlPool :: ()UnlockCurlPool :: ()InitCurl :: ()CurlReady :: () -> boolCurlOrigin :: (url: string) -> stringCredentials in URL authorities retain a private handle. Normal bearer requests pool by origin and proxy policy, with every option reset afterward.
AcquireCurl :: (url: string, direct: bool) -> CurlLeaseReleaseCurl :: (lease: CurlLease)CloseCurlConnections :: ()StartsWith :: (value: string, prefix: string) -> boolMethodToken :: (value: string) -> boolHeaderName :: (value: string) -> boolCurlResult :: struct { status: s32; length: s64; code: s32; truncated: bool; }CurlOutput :: struct { data: *u8; capacity: s64; length: s64; truncated: bool; }CurlWriteCallback64 :: #type (data: *u8, size: u64, count: u64, user: *void) -> u64CurlWriteCallback32 :: #type (data: *u8, size: u32, count: u32, user: *void) -> u32AppendCurlOutput :: (data: *u8, size: u64, count: u64, context: *CurlOutput) -> u64CurlWrite64 :: (data: *u8, size: u64, count: u64, user: *void) -> u64CurlWrite32 :: (data: *u8, size: u32, count: u32, user: *void) -> u32SetCurlLong :: (handle: *void, option: s32, value: s32) -> boolReadCurlStatus :: (handle: *void) -> s32HeaderText :: (prefix: string, value: string, output: []u8) -> boolAddCurlHeader :: (headers: **void, prefix: string, value: string, buffer: []u8) -> boolAddNamedHeader :: (headers: **void, name: string, value: string, buffer: []u8) -> boolSendCurl :: (request: HttpRequest, output: []u8) -> CurlResultThe caller owns output. It remains NUL terminated, including on failure. HTTP errors retain their status and body for protocol-level decisions.
SendCurlWithin :: (request: HttpRequest, output: []u8, timeout_ms: s32) -> CurlResultThe same request with its own total timeout, for slow services such as model generation. Connecting still has 10 seconds.
SendCurlDirectWithin :: (request: HttpRequest, output: []u8, timeout_ms: s32) -> CurlResultBypass inherited proxy settings and never follow redirects. Callers still own URL authorization; this is useful for private local service transports.
SendCurlConfigured :: (request: HttpRequest, output: []u8, timeout_ms: s32, direct: bool) -> CurlResult