File tree 6 files changed +14
-14
lines changed
6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ This is easy to find out using the `http` package. Let's see how to handle the f
55
55
fmt.Println("password:", r.Form["password"])
56
56
}
57
57
}
58
-
58
+
59
59
func main() {
60
60
http.HandleFunc("/", sayhelloName) // setting router rule
61
61
http.HandleFunc("/login", login)
@@ -84,9 +84,9 @@ Try changing the value of the action in the form `http://127.0.0.1:9090/login` t
84
84
85
85
![ ] ( images/4.1.slice.png?raw=true )
86
86
87
- Figure 4.2 Server prints request data
87
+ Figure 4.2 Server prints request data
88
88
89
- The type of ` request.Form ` is ` url.Value ` . It saves data with the format ` key=value ` .
89
+ The type of ` request.Form ` is ` url.Values ` . It saves data with the format ` key=value ` .
90
90
91
91
v := url.Values{}
92
92
v.Set("name", "Ava")
Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ Try changing the value of the action in the form `http://127.0.0.1:9090/login` t
85
85
86
86
![ ] ( images/4.1.slice.png?raw=true )
87
87
88
- Figure 4.2 Server prints request data
88
+ Figure 4.2 Server prints request data
89
89
90
- The type of ` request.Form ` is ` url.Value ` . It saves data with the format ` key=value ` .
90
+ The type of ` request.Form ` is ` url.Values ` . It saves data with the format ` key=value ` .
91
91
``` Go
92
92
v := url.Values {}
93
93
v.Set (" name" , " Ava" )
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ Trata de cambiar la URL de ingreso de `http://127.0.0.1:9090/login` a `http://12
86
86
87
87
Figure 4.2 Server prints request data
88
88
89
- El tipo de ` request.Form ` es ` url.Value ` . Y lo guarda en el formato ` llave=valor ` .
89
+ El tipo de ` request.Form ` es ` url.Values ` . Y lo guarda en el formato ` llave=valor ` .
90
90
```
91
91
v := url.Values{}
92
92
v.Set("name", "Ava")
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ This is easy to find out using the `http` package. Let's see how to handle the f
55
55
fmt.Println("password:", r.Form["password"])
56
56
}
57
57
}
58
-
58
+
59
59
func main() {
60
60
http.HandleFunc("/", sayhelloName) // setting router rule
61
61
http.HandleFunc("/login", login)
@@ -84,9 +84,9 @@ Try changing the value of the action in the form `http://127.0.0.1:9090/login` t
84
84
85
85
![ ] ( images/4.1.slice.png?raw=true )
86
86
87
- Figure 4.2 Server prints request data
87
+ Figure 4.2 Server prints request data
88
88
89
- The type of ` request.Form ` is ` url.Value ` . It saves data with the format ` key=value ` .
89
+ The type of ` request.Form ` is ` url.Values ` . It saves data with the format ` key=value ` .
90
90
91
91
v := url.Values{}
92
92
v.Set("name", "Ava")
Original file line number Diff line number Diff line change 55
55
fmt.Println("Пароль:", r.Form["password"])
56
56
}
57
57
}
58
-
58
+
59
59
func main() {
60
60
http.HandleFunc("/", sayhelloName) // устанавливаем правила маршрутизатора
61
61
http.HandleFunc("/login", login)
84
84
85
85
![ ] ( images/4.1.slice.png?raw=true )
86
86
87
- Рисунок 4.2 Сервер печатает данные запроса
87
+ Рисунок 4.2 Сервер печатает данные запроса
88
88
89
- Тип поля ` request.Form ` - это ` url.Value ` . Данные в нем сохраняются в формате ` ключ=значение ` .
89
+ Тип поля ` request.Form ` - это ` url.Values ` . Данные в нем сохраняются в формате ` ключ=значение ` .
90
90
91
91
v := url.Values{}
92
92
v.Set("name", "Ava")
Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ Try changing the value of the action in the form `http://127.0.0.1:9090/login` t
85
85
86
86
![ ] ( images/4.1.slice.png?raw=true )
87
87
88
- Figure 4.2 Server prints request data
88
+ Figure 4.2 Server prints request data
89
89
90
- The type of ` request.Form ` is ` url.Value ` . It saves data with the format ` key=value ` .
90
+ The type of ` request.Form ` is ` url.Values ` . It saves data with the format ` key=value ` .
91
91
``` Go
92
92
v := url.Values {}
93
93
v.Set (" name" , " Ava" )
You can’t perform that action at this time.
0 commit comments