mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
vlib/io: fix reader bugs, make read_all take a config struct (#7361)
This commit is contained in:
parent
1a2c7cd336
commit
553ecf63e7
10 changed files with 227 additions and 75 deletions
|
@ -8,7 +8,7 @@ fn main() {
|
|||
// Simple http HEAD request for a file
|
||||
conn.write_str('HEAD /index.html HTTP/1.0\r\n\r\n')?
|
||||
// Read all the data that is waiting
|
||||
result := io.read_all(conn)?
|
||||
result := io.read_all(reader: conn)?
|
||||
// Cast to string and print result
|
||||
println(result.bytestr())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue