API Reference › Http › Http.ok
method

Http.ok

Http.ok(handle) -> bool

Returns whether the response status is in the 2xx success range.

Example

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