//main.v
module main
import net
fn main() {
// println("hello V")
mut arr := []byte{}
mut client_conn := net.dial_tcp('baidu.com:80')?
defer {
client_conn.close()?
}
client_conn.write_str('GET /index.html HTTP/1.0\r\n\r\n') ?
client_conn.set_read_timeout(net.infinite_timeout)
client_conn.read(mut &arr) or {
println("fail")
}
println(arr)
}
请求为什么会Fail