http_client_interface.go 420 B

12345678910111213141516
  1. package client
  2. import (
  3. "io"
  4. "net/http"
  5. "net/url"
  6. )
  7. type HTTPClientInterface interface {
  8. Do(req *http.Request) (*http.Response, error)
  9. Get(url string) (resp *http.Response, err error)
  10. Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
  11. PostForm(url string, data url.Values) (resp *http.Response, err error)
  12. Head(url string) (resp *http.Response, err error)
  13. CloseIdleConnections()
  14. }