Update 15.3.md

This commit is contained in:
glight2000
2015-12-12 20:43:15 +08:00
parent f0e12f9877
commit adc4338b45

View File

@@ -124,26 +124,19 @@ status: Robot cars invade California, on orders from Google: Google has been tes
go为所有的HTTP状态码定义了常量比如
http.StatusContinue = 100
http.StatusOK = 200
http.StatusFound = 302
http.StatusBadRequest = 400
http.StatusUnauthorized = 401
http.StatusForbidden = 403
http.StatusNotFound = 404
http.StatusInternalServerError = 500
你可以使用`w.header().Set("Content-Type", "../..")设置头信息
比如在网页应用发送html字符串的时候在输出之前执行`w.Header().Set("Content-Type", "text/html")`。
练习 15.4:扩展 http_fetch.go 使之可以从控制台读取url使用[章节12.1](12.1.md)学到的接收控制台输入的方法 [http_fetch2.go](examples/chapter_15/http_fetch2.go)
练习 15.4:扩展 http_fetch.go 使之可以从控制台读取url使用[章节12.1](12.1.md)学到的接收控制台输入的方法 [http_fetch2.go](examples/chapter_15/http_fetch2.go)
练习 15.5获取json格式的推特状态就像示例 15.9[twitter_status_json.go](examples/chapter_15/twitter_status_json.go)