
Welcome
namespace examples.scripts
using clox.std.net.HTTPClient
using clox.std.net.URL
val client = HTTPClient()
val response = await client.getAsync(URL.parse("https://example.com"))
if (response.status != 200) {
throw Exception("HTTP error! Status: ${response.status}")
}
println("Content: ${response.content}")
client.close()Jump right in
Last updated