method
Http.poll
Http.poll(handle) -> int
Polls a request without blocking: returns -1 while pending, 0 on a transport error, else the HTTP status code once the reply lands.
Example
program Demo {
entry {
let h = Http.get("https://example.com")
let st = Http.poll(h)
if st > 0 { print(Http.status(h)) }
}
}