Documentation
¶
Overview ¶
Package form 用于处理 www-form-urlencoded 编码
func read(w http.ResponseWriter, r *http.Request) {
ctx := web.New(w, r)
vals := urls.Values{}
!ctx.Read(vals)
}
func write(w http.ResponseWriter, r *http.Request) {
ctx := web.New(w, r)
vals := urls.Values{}
vals.Add("name", "caixw")
ctx.Render(http.StatusOK, vals, nil)
}
Index ¶
Constants ¶
View Source
const MimeType = "application/x-www-form-urlencoded"
MimeType 当前编码的媒体类型
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Unmarshaler ¶
Unmarshaler 将 form 类型转换成一个对象
Click to show internal directories.
Click to hide internal directories.