Web server test

This commit is contained in:
2016-06-27 22:22:52 +05:00
parent cb00d423e7
commit 67cc81631a

View File

@@ -68,8 +68,12 @@ func main() {
if *http_port != -1 {
http.HandleFunc("/switch", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "%q", r.URL.RawQuery)
n.Switch(7)
fmt.Fprintf(w, "%q", r.URL.Query())
err := n.Switch(7)
if err != nil {
fmt.Fprintf(w, "%q", err)
}
})
http.ListenAndServe(":8080", nil)