V Lang - http module not found??
Go to solution
Solved by Shubhendra,
instead of using "import http" use "import net.http"
module main 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()) // yyyy-mm-dd hh:mm }
-
Featured Topics
-
Topics
-
0
-
0
-
Magnumenforce ·
Posted in Phones and Tablets1 -
1
-
0
-
6
-
Crash The Noise ·
Posted in Programs, Apps and Websites3 -
3
-
8
-
0
-
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now