Add body to benchHandler
This commit is contained in:
3
app.go
3
app.go
@ -47,10 +47,9 @@ func printBinary(s []byte) {
|
|||||||
fmt.Printf("\n")
|
fmt.Printf("\n")
|
||||||
}
|
}
|
||||||
func benchHandler(w http.ResponseWriter, r *http.Request) {
|
func benchHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
// body := "Hello World\n"
|
|
||||||
w.Header().Set("Connection", "keep-alive")
|
w.Header().Set("Connection", "keep-alive")
|
||||||
w.Header().Set("Content-Type", "text/plain")
|
w.Header().Set("Content-Type", "text/plain")
|
||||||
// fmt.Fprint(w, body)
|
fmt.Fprint(w, "1")
|
||||||
}
|
}
|
||||||
func echoHandler(w http.ResponseWriter, r *http.Request) {
|
func echoHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
conn, err := upgrader.Upgrade(w, r, nil)
|
conn, err := upgrader.Upgrade(w, r, nil)
|
||||||
|
Reference in New Issue
Block a user