Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestClient ¶
type RequestClient interface {
GetClient() *http.Client
Head(url string) (resp *http.Response, err error)
HeadSync(url string) func() ([]byte, error)
Get(url string) (resp *http.Response, err error)
GetSync(url string) func() ([]byte, error)
Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
PostSyncJson(url string, sendBody interface{}) func() ([]byte, error)
PostSyncJsonWithHeaders(url string, sendBody interface{}, headers map[string]string) func() ([]byte, error)
PostSyncJsonBodyWithHeaders(url string, jsonBody string, headers map[string]string) func() ([]byte, error)
PostSyncJsonWithFile(url string, fileFieldName, fileName string, file io.Reader, fields map[string]string) func() ([]byte, error)
Put(url, contentType string, body io.Reader) (resp *http.Response, err error)
PutSyncJson(url string, sendBody interface{}) func() ([]byte, error)
Delete(url string) (resp *http.Response, err error)
DeleteSync(url string) func() ([]byte, error)
}
func NewRequestClient ¶
func NewRequestClient() RequestClient
Click to show internal directories.
Click to hide internal directories.