v/examples/fetch.v
2021-02-23 20:21:50 +02:00

13 lines
211 B
V

import time
import net.http
fn main() {
resp := http.get('https://vlang.io/utc_now') or {
println('failed to fetch data from the server')
return
}
t := time.unix(resp.text.int())
println(t.format())
}