Go实现http post form表单

go http post form(表单)

resp, err := http.PostForm("https://xxx.com/xxx", url.Values{
  "x1":   {"xxxxxx"},
  "x2":     {strings.Join(aa, ",")},
  "x3": {content}})
if err != nil {
  fmt.Println("phoneAlarm request error")
}
defer resp.Body.Close()

 

Leave a Reply

Your email address will not be published.