mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:55:28 +08:00
Update 15.3.md (#675)
This commit is contained in:
@@ -42,8 +42,7 @@ http://blog.golang.org/ : 200 OK
|
||||
***译者注*** 由于国内的网络环境现状,很有可能见到如下超时错误提示:
|
||||
|
||||
```
|
||||
Error: http://www.google.com/ Head http://www.google.com/: dial tcp 216.58.221.100:80: connectex: A connection attempt failed because the connected pa
|
||||
rty did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
|
||||
Error: http://www.google.com/ Head http://www.google.com/: dial tcp 216.58.221.100:80: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
|
||||
```
|
||||
在下边的程序中我们使用`http.Get()`获取网页内容; `Get`的返回值`res`中的`Body`属性包含了网页内容,然后我们用`ioutil.ReadAll`把它读出来:
|
||||
|
||||
|
Reference in New Issue
Block a user