API Reference › Http › Http.text
method

Http.text

Http.text(handle) -> str

Returns the response body as a NUL-terminated string. Pair with Json.parse (#44) for JSON APIs.

Example

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