rest.go 270 B

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