Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient help to send http requests
func GetHTTPClient ¶
func GetHTTPClient(insecure bool) *HTTPClient
GetHTTPClient returns the singleton HTTP client based on the insecure setting.
func NewHTTPClient ¶
func NewHTTPClient(insecure bool) *HTTPClient
NewHTTPClient creates a new http client.
func (*HTTPClient) Get ¶
func (hc *HTTPClient) Get(url string, cred *auth.Credential, parmas map[string]string, options map[string]string) ([]byte, error)
Get content from the url
func (*HTTPClient) Post ¶
func (hc *HTTPClient) Post(url string, cred *auth.Credential, body interface{}, options map[string]string) ([]byte, error)
Post content to the service specified by the url
Click to show internal directories.
Click to hide internal directories.