Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClientWrapper ¶
type HttpClientWrapper struct { // base is the root URL for all invocations of the client BaseURL string // Set specific behavior of the client. If not set http.DefaultClient will be used. *http.Client }
HttpClientWrapper imposes common Client API conventions on a set of resource paths. The baseURL is expected to point to an HTTP path that is the parent of one or more resources. The server should return a decodable API resource object, or an Status object which contains information about the reason for any failure.
func NewHttpClientWrapper ¶
func NewHttpClientWrapper(client *http.Client, baseUrl string) *HttpClientWrapper
NewHttpClientWrapper wraps http.Client to extend this client additional features
func (*HttpClientWrapper) Get ¶
func (c *HttpClientWrapper) Get() NewRequest
Get begins a GET request. Short for c.Verb("GET").
func (*HttpClientWrapper) Into ¶
func (c *HttpClientWrapper) Into(body io.ReadCloser, r interface{}) error
func (*HttpClientWrapper) Verb ¶
func (c *HttpClientWrapper) Verb(verb string) NewRequest
Verb begins a request with a http method verb.
Click to show internal directories.
Click to hide internal directories.