diff --git a/4.1.md b/4.1.md index 956de5ef..f855e196 100644 --- a/4.1.md +++ b/4.1.md @@ -45,6 +45,7 @@ http包里面有一个很简单的方式就可以获取,我们在前面web的 } func login(w http.ResponseWriter, r *http.Request) { + r.ParseForm() fmt.Println("method:", r.Method) //获取请求的方法 if r.Method == "GET" { t, _ := template.ParseFiles("login.gtpl")