Documentation
¶
Index ¶
- Constants
- type HTTPClient
- func (c *HTTPClient) Delete(url string, params map[string]interface{}, headers map[string]string) (*http.Response, error)
- func (c *HTTPClient) Get(url string, params map[string]interface{}, headers map[string]string) (*http.Response, error)
- func (c *HTTPClient) Post(url string, bodyType string, body io.Reader, headers map[string]string) (*http.Response, error)
- func (c *HTTPClient) PostForm(url string, data map[string]interface{}, headers map[string]string) (*http.Response, error)
- func (c *HTTPClient) PostJson(url string, data interface{}, headers map[string]string) (*http.Response, error)
- func (c *HTTPClient) SetDebug(debug bool) *HTTPClient
- func (c *HTTPClient) SetTimeout(connTimeout, rwTimeout time.Duration) *HTTPClient
Constants ¶
View Source
const ( GET = "GET" POST = "POST" DELETE = "DELETE" )
HTTP methods we support
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient() *HTTPClient
func (*HTTPClient) SetDebug ¶
func (c *HTTPClient) SetDebug(debug bool) *HTTPClient
func (*HTTPClient) SetTimeout ¶
func (c *HTTPClient) SetTimeout(connTimeout, rwTimeout time.Duration) *HTTPClient
Click to show internal directories.
Click to hide internal directories.