API Reference › Http › Http.status
method

Http.status

Http.status(handle) -> int

Returns the cached HTTP status code (0 until the reply lands or on error).

Example

program Demo {
  entry {
    let h = Http.get("https://example.com")
    if Http.poll(h) > 0 { print(Http.status(h)) }
  }
}
← All symbols