mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:06:41 +08:00
update 15.3 (#528)
This commit is contained in:
@@ -139,7 +139,7 @@ go为所有的HTTP状态码定义了常量,比如:
|
|||||||
http.StatusNotFound = 404
|
http.StatusNotFound = 404
|
||||||
http.StatusInternalServerError = 500
|
http.StatusInternalServerError = 500
|
||||||
|
|
||||||
你可以使用`w.header().Set("Content-Type", "../..")设置头信息
|
你可以使用`w.header().Set("Content-Type", "../..")`设置头信息
|
||||||
|
|
||||||
比如在网页应用发送html字符串的时候,在输出之前执行`w.Header().Set("Content-Type", "text/html")`。
|
比如在网页应用发送html字符串的时候,在输出之前执行`w.Header().Set("Content-Type", "text/html")`。
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user