【发布时间】:2013-05-06 21:27:34
【问题描述】:
下面是一个用 go 写的服务器。
package main
import (
"fmt"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
fmt.Fprintf(w,"%s",r.Method)
}
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}
如何提取发送到localhost:8080/something URL 的POST 数据?
【问题讨论】: