poster.go 239 B

123456789101112131415
  1. package main
  2. import (
  3. "log"
  4. "net/http"
  5. "net/url"
  6. )
  7. func Post(where string, data *url.Values) *http.Response {
  8. resp, err := http.PostForm(where, *data)
  9. if err != nil {
  10. log.Fatalf("POST got non 200 code, %v", err)
  11. }
  12. return resp
  13. }