Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
type HttpClient interface {
Post(urll string, body interface{}, result interface{}, errorResponse interface{}) (StatusCode, error)
Get(urll string, result interface{}, errorResponse interface{}) (StatusCode, error)
SetHeader(headers map[string][]string) *httpClient
SetQueryParams(params map[string]string) *httpClient
SetBasicAuth(username, password string) *httpClient
// PostStream sends a POST request and returns raw response for streaming
PostStream(url string, data any) (*http.Response, error)
// GetStream sends a GET request and returns raw response for streaming
GetStream(url string) (*http.Response, error)
}
func NewHttp ¶
func NewHttp() HttpClient
Click to show internal directories.
Click to hide internal directories.