reqUrl := "###" //请求url content := "" cType := "" resp, err := http.PostForm(reqUrl, url.Values{"参数1": {content}, "参数2": {cType}}) if resp != nil { defer func() { e := resp.Body.Close() fmt.Println(e) }() } body, err := ioutil.ReadAll(resp.Body) fmt.Println("body...................", string(body)) if err != nil { fmt.Println("readall err..........", err) return false } p := make(map[string]interface{}) err = json.Unmarshal(body, &p) if err != nil { fmt.Println("Unmarshal err,,,,,,,,,,,,,", err) } i2 := p["data"].(map[string]interface{}) code := i2["code"]