Documentation
¶
Index ¶
- type ClientWrapper
- func (c *ClientWrapper) Do(req *http.Request) (resp *http.Response, err error)
- func (c *ClientWrapper) DoWithContext(ctx context.Context, req *http.Request) (resp *http.Response, err error)
- func (c *ClientWrapper) Get(url string) (resp *http.Response, err error)
- func (c *ClientWrapper) GetWithContext(ctx context.Context, url string) (resp *http.Response, err error)
- func (c *ClientWrapper) Head(url string) (resp *http.Response, err error)
- func (c *ClientWrapper) HeadWithContext(ctx context.Context, url string) (resp *http.Response, err error)
- func (c *ClientWrapper) Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
- func (c *ClientWrapper) PostForm(url string, data gourl.Values) (resp *http.Response, err error)
- func (c *ClientWrapper) PostFormWithContext(ctx context.Context, url string, data gourl.Values) (resp *http.Response, err error)
- func (c *ClientWrapper) PostWithContext(ctx context.Context, url, contentType string, body io.Reader) (resp *http.Response, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientWrapper ¶
ClientWrapper wraps the default http.Client
func Wrap ¶
func Wrap(c http.Client) *ClientWrapper
Wrap wraps the given http.Client with ClientWrapper
func (*ClientWrapper) DoWithContext ¶
func (c *ClientWrapper) DoWithContext(ctx context.Context, req *http.Request) (resp *http.Response, err error)
DoWithContext wraps the http.Client.Do and starts a new span for the http call. The newly created span will be a child of the span whose context is is passed using the ctx parameter
func (*ClientWrapper) Get ¶
func (c *ClientWrapper) Get(url string) (resp *http.Response, err error)
Get wraps the http.Client.Get and starts a new span for the http call
func (*ClientWrapper) GetWithContext ¶
func (c *ClientWrapper) GetWithContext(ctx context.Context, url string) (resp *http.Response, err error)
GetWithContext wraps the http.Client.Get and starts a new span for the http call. The newly created span will be a child of the span whose context is is passed using the ctx parameter
func (*ClientWrapper) Head ¶
func (c *ClientWrapper) Head(url string) (resp *http.Response, err error)
Head wraps the http.Client.Head and starts a new span for the http call
func (*ClientWrapper) HeadWithContext ¶
func (c *ClientWrapper) HeadWithContext(ctx context.Context, url string) (resp *http.Response, err error)
HeadWithContext wraps the http.Client.Head and starts a new span for the http call. The newly created span will be a child of the span whose context is is passed using the ctx parameter
func (*ClientWrapper) Post ¶
func (c *ClientWrapper) Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
Post wraps the http.Client.Post and starts a new span for the http call
func (*ClientWrapper) PostForm ¶
PostForm wraps the http.Client.PostForm and starts a new span for the http call
func (*ClientWrapper) PostFormWithContext ¶
func (c *ClientWrapper) PostFormWithContext(ctx context.Context, url string, data gourl.Values) (resp *http.Response, err error)
PostFormWithContext wraps the http.Client.PostForm and starts a new span for the http call. The newly created span will be a child of the span whose context is is passed using the ctx parameter
func (*ClientWrapper) PostWithContext ¶
func (c *ClientWrapper) PostWithContext(ctx context.Context, url, contentType string, body io.Reader) (resp *http.Response, err error)
PostWithContext wraps the http.Client.Post and starts a new span for the http call. The newly created span will be a child of the span whose context is is passed using the ctx parameter