Documentation ¶
Index ¶
- func MakeURL(scheme, host, path string, args url.Values) string
- type HTTPClient
- func (c *HTTPClient) Delete(url string) (statusCode int, err error)
- func (c *HTTPClient) Get(scheme, host, path string, values url.Values) (respBody []byte, statusCode int, err error)
- func (c *HTTPClient) GetWithHeaders(fullURL string, headers map[string]string) (respBody []byte, statusCode int, err error)
- func (c *HTTPClient) GetWithURL(fullURL string) (respBody []byte, statusCode int, err error)
- func (c *HTTPClient) PostForm(_url string, values url.Values) (respBody []byte, statusCode int, err error)
- func (c *HTTPClient) Upload(uploadURL string, filename string, reader io.Reader, isGzipped bool, ...) (respBody []byte, statusCode int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPClient ¶
HTTPClient wrapper for http client
func NewHTTPClient ¶
func NewHTTPClient(timeout time.Duration) *HTTPClient
NewHTTPClient new http client wrapper
func (*HTTPClient) Delete ¶
func (c *HTTPClient) Delete(url string) (statusCode int, err error)
Delete make delete method request
func (*HTTPClient) Get ¶
func (c *HTTPClient) Get(scheme, host, path string, values url.Values) (respBody []byte, statusCode int, err error)
Get make get request
func (*HTTPClient) GetWithHeaders ¶
func (c *HTTPClient) GetWithHeaders(fullURL string, headers map[string]string) (respBody []byte, statusCode int, err error)
GetWithHeaders do get with customer headers
func (*HTTPClient) GetWithURL ¶
func (c *HTTPClient) GetWithURL(fullURL string) (respBody []byte, statusCode int, err error)
GetWithURL do http get with full url/uri
Click to show internal directories.
Click to hide internal directories.