Update 15.3.md (#675)

This commit is contained in:
marjune
2019-07-11 12:05:02 +08:00
committed by ᴊ. ᴄʜᴇɴ
parent 4b5092193f
commit 4866b1922c

View File

@@ -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`把它读出来: