rest.go 229 B

123456789101112131415
  1. package bar
  2. import (
  3. "log"
  4. "net/http"
  5. )
  6. func put(url string) (resp *http.Response, err error) {
  7. req, err := http.NewRequest("PUT", url, nil)
  8. if err != nil {
  9. log.Print(err)
  10. return
  11. }
  12. return http.DefaultClient.Do(req)
  13. }