Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseURLAwareClient ¶
type BaseURLAwareClient interface { NewRequest(method, path string, body interface{}) (*http.Request, error) Do(req *http.Request, result interface{}) (Status, []byte, error) }
BaseURLAwareClient is a http client that can build requests not from a full URL, but from a path relative to a configured base url this is useful for REST-APIs that always connect to the same host, but on different paths.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
NewHTTPClient creates a new client and ensures that the given baseURL ends with a trailing '/'. The trailing '/' is required later for constructing the full URL using a relative path.
func (*Client) GetHTTPClient ¶
type Error ¶
Click to show internal directories.
Click to hide internal directories.