Documentation
¶
Overview ¶
HTTP Client which handles generic error routing and marshaling
Index ¶
- Variables
- type HttpClient
- func (h *HttpClient) HttpDelete(url string, data interface{}, result interface{}) *Response
- func (h *HttpClient) HttpGet(url string, result interface{}) *Response
- func (h *HttpClient) HttpPost(url string, data interface{}, result interface{}) *Response
- func (h *HttpClient) HttpPut(url string, data interface{}, result interface{}) *Response
- type HttpClientConfig
- type Method
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient(config HttpClientConfig) *HttpClient
func (*HttpClient) HttpDelete ¶
func (h *HttpClient) HttpDelete(url string, data interface{}, result interface{}) *Response
func (*HttpClient) HttpGet ¶
func (h *HttpClient) HttpGet(url string, result interface{}) *Response
func (*HttpClient) HttpPost ¶
func (h *HttpClient) HttpPost(url string, data interface{}, result interface{}) *Response
func (*HttpClient) HttpPut ¶
func (h *HttpClient) HttpPut(url string, data interface{}, result interface{}) *Response
type HttpClientConfig ¶
type HttpClientConfig struct {
sync.RWMutex
// Http Basic Auth Username
HttpUser string
// Http Basic Auth Password
HttpPass string
// Request timeout
RequestTimeout int
}
func NewDefaultConfig ¶
func NewDefaultConfig() *HttpClientConfig
Click to show internal directories.
Click to hide internal directories.