12345678910111213141516171819 |
- package main
- import (
- "fmt"
- "io/ioutil"
- "net/http"
- )
- func main() {
- http.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) {
- b, err := ioutil.ReadAll(r.Body)
- if err != nil {
- panic(err)
- }
- fmt.Println(string(b))
- })
- http.ListenAndServe("127.0.0.1:8899", nil)
- }
|