Documentation ¶
Index ¶
- Variables
- type HTTPClient
- func (hc *HTTPClient) CreateRequest(ctx context.Context, httpMethod string, url string, header http.Header, ...) (*http.Request, error)
- func (hc *HTTPClient) Do(ctx context.Context, r *http.Request) ([]byte, error)
- func (hc *HTTPClient) GetFullUrl() *url.URL
- func (hc *HTTPClient) GetUlrWithMethods(method string) *url.URL
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
type HTTPClient struct { Scheme string Host string BasePath string // contains filtered or unexported fields }
func NewHTTPClient ¶
func NewHTTPClient(host, basePath, scheme string, client http.Client) *HTTPClient
func (*HTTPClient) CreateRequest ¶
func (hc *HTTPClient) CreateRequest(ctx context.Context, httpMethod string, url string, header http.Header, body io.Reader, query url.Values) (*http.Request, error)
CreateRequest return http.Request with given parameters. If you don't need some of the parameters then give nil.
func (*HTTPClient) GetFullUrl ¶
func (hc *HTTPClient) GetFullUrl() *url.URL
func (*HTTPClient) GetUlrWithMethods ¶
func (hc *HTTPClient) GetUlrWithMethods(method string) *url.URL
Click to show internal directories.
Click to hide internal directories.