在没有任何框架的加持下,如果客户端(前端)传递过来的数据类型是:text/plain 。
// 请求头
Content-Type: text/plain;charset=UTF-8
Go 的解析方式是:
import (
"io/ioutil"
...
)
func apiHandler(w http.ResponseWriter, r
在没有任何框架的加持下,如果客户端(前端)传递过来的数据类型是:text/plain 。
// 请求头
Content-Type: text/plain;charset=UTF-8
Go 的解析方式是:
import (
"io/ioutil"
...
)
func apiHandler(w http.ResponseWriter, r