|
|
@@ -139,7 +139,7 @@ go为所有的HTTP状态码定义了常量,比如:
|
|
|
http.StatusNotFound = 404
|
|
|
http.StatusInternalServerError = 500
|
|
|
|
|
|
-你可以使用`w.header().Set("Content-Type", "../..")设置头信息
|
|
|
+你可以使用`w.header().Set("Content-Type", "../..")`设置头信息
|
|
|
|
|
|
比如在网页应用发送html字符串的时候,在输出之前执行`w.Header().Set("Content-Type", "text/html")`。
|
|
|
|