thundrahttp

package
v2.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientWrapper

type ClientWrapper struct {
	http.Client
}

ClientWrapper wraps the default http.Client

func Wrap

func Wrap(c http.Client) *ClientWrapper

Wrap wraps the given http.Client with ClientWrapper

func (*ClientWrapper) Do

func (c *ClientWrapper) Do(req *http.Request) (resp *http.Response, err error)

Do wraps the http.Client.Do and starts a new span for the http call

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

func (c *ClientWrapper) PostForm(url string, data gourl.Values) (resp *http.Response, err error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL