main.go 339 B

1234567891011121314151617181920
  1. package main
  2. import (
  3. "fmt"
  4. "net/http"
  5. "strings"
  6. )
  7. func main() {
  8. body := `{"userinfo":"tmr.shengmu23.bbc","openid":"123"}`
  9. resp, err := http.Post("http://kpttest.kptyun.com/userwxopenid/binding",
  10. "application/json", strings.NewReader(body))
  11. if err != nil {
  12. panic(err)
  13. }
  14. defer resp.Body.Close()
  15. fmt.Printf("%+v\n", resp)
  16. }