1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/examples/fetch.v

14 lines
220 B
V
Raw Normal View History

2020-04-28 14:57:48 +03:00
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())
}