Skip to content

Commit

Permalink
Update 15.3.md
Browse files Browse the repository at this point in the history
  • Loading branch information
glight2000 committed Dec 12, 2015
1 parent 864e00b commit f0e12f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eBook/15.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,21 @@ status: Robot cars invade California, on orders from Google: Google has been tes
*`http.Request`对象的一个重要属性`req``req.Method`,这是一个包含`GET``POST`字符串,用来描述网页是以何种方式被请求的。

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", "../..")设置头信息
Expand Down

0 comments on commit f0e12f9

Please sign in to comment.