需要结合标准库urlValues结构体,比如:

postData := url.Values{}
postData.Add("name", "Chris")
postData.Add("language", "golang")

普通post请求可以直接使用http.Post方法,第二个参数为application/x-www-form-urlencoded,如:

response, err := http.Post("https://xorpay.com/api/pay/aid", "application/x-www-form-urlencoded", strings.NewReader(postData.Encode()))