client

package
v0.0.0-...-579d35e Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTransport

func DefaultTransport() *http.Transport

func DefaultTransportWithProxy

func DefaultTransportWithProxy(proxy func(*http.Request) (*url.URL, error)) *http.Transport

func DefaultTransportWithTLS

func DefaultTransportWithTLS(tlsClientConfig *tls.Config) *http.Transport

func DefaultTransportWithTLSAndProxy

func DefaultTransportWithTLSAndProxy(proxy func(*http.Request) (*url.URL, error), tlsClientConfig *tls.Config) *http.Transport

func TimeoutDialer

func TimeoutDialer(cTimeout, rwTimeout time.Duration) func(netw, addr string) (c net.Conn, err error)

func TransportWithProxyAndSkipVerifyAndTimeOut

func TransportWithProxyAndSkipVerifyAndTimeOut(proxy func(*http.Request) (*url.URL, error), headerTimeout, connectTimeout, readWriteTimeout time.Duration) *http.Transport

func TransportWithProxyAndTimeOut

func TransportWithProxyAndTimeOut(proxy func(*http.Request) (*url.URL, error), tlsClientConfig *tls.Config, headerTimeout, connectTimeout, readWriteTimeout time.Duration) *http.Transport

func TransportWithSkipVerifyAndTimeOut

func TransportWithSkipVerifyAndTimeOut(headerTimeout, connectTimeout, readWriteTimeout time.Duration) *http.Transport

func TransportWithTimeOut

func TransportWithTimeOut(tlsClientConfig *tls.Config, headerTimeout, connectTimeout, readWriteTimeout time.Duration) *http.Transport

Types

type Client

type Client struct {
	*http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func NewClientWhthTLSAndHeader

func NewClientWhthTLSAndHeader(tlsClientConfig *tls.Config, header http.Header) *Client

func NewClientWhthTLSAndProxyAndHeader

func NewClientWhthTLSAndProxyAndHeader(tlsClientConfig *tls.Config, proxy func(*http.Request) (*url.URL, error), header http.Header) *Client

func NewClientWhthTransportAndHeader

func NewClientWhthTransportAndHeader(transport *http.Transport, header http.Header) *Client

func NewClientWithHeader

func NewClientWithHeader(header http.Header) *Client

func NewClientWithProxy

func NewClientWithProxy(proxy func(*http.Request) (*url.URL, error)) *Client

func NewClientWithProxyAndHeader

func NewClientWithProxyAndHeader(proxy func(*http.Request) (*url.URL, error), header http.Header) *Client

func NewClientWithTLS

func NewClientWithTLS(tlsClientConfig *tls.Config) *Client

func NewClientWithTLSAndProxy

func NewClientWithTLSAndProxy(tlsClientConfig *tls.Config, proxy func(*http.Request) (*url.URL, error)) *Client

func NewClientWithTransport

func NewClientWithTransport(transport *http.Transport) *Client

func (*Client) Delete

func (c *Client) Delete(rawurl string) (*http.Response, error)

func (*Client) DeleteForm

func (c *Client) DeleteForm(rawurl string, data url.Values) (*http.Response, error)

func (*Client) DeleteFormJson

func (c *Client) DeleteFormJson(rawurl string, data []byte) (*http.Response, error)

func (*Client) DeleteFormJsonWithHeader

func (c *Client) DeleteFormJsonWithHeader(rawurl string, header http.Header, data []byte) (*http.Response, error)

func (*Client) DeleteFormWithHeader

func (c *Client) DeleteFormWithHeader(rawurl string, header http.Header, data url.Values) (*http.Response, error)

func (*Client) DeleteJson

func (c *Client) DeleteJson(rawurl string, data []byte) (*http.Response, error)

func (*Client) DeleteJsonWithHeader

func (c *Client) DeleteJsonWithHeader(rawurl string, header http.Header, data []byte) (*http.Response, error)

func (*Client) DeleteWithHeader

func (c *Client) DeleteWithHeader(rawurl string, header http.Header) (*http.Response, error)

func (*Client) Get

func (c *Client) Get(rawurl string) (*http.Response, error)

func (*Client) GetForm

func (c *Client) GetForm(rawurl string, data url.Values) (*http.Response, error)

func (*Client) GetFormJson

func (c *Client) GetFormJson(rawurl string, data []byte) (*http.Response, error)

func (*Client) GetFormJsonWithHeader

func (c *Client) GetFormJsonWithHeader(rawurl string, header http.Header, data []byte) (*http.Response, error)

func (*Client) GetFormWithHeader

func (c *Client) GetFormWithHeader(rawurl string, header http.Header, data url.Values) (*http.Response, error)

func (*Client) GetJson

func (c *Client) GetJson(rawurl string, data []byte) (*http.Response, error)

func (*Client) GetJsonWithHeader

func (c *Client) GetJsonWithHeader(rawurl string, header http.Header, data []byte) (*http.Response, error)

func (*Client) GetWithHeader

func (c *Client) GetWithHeader(rawurl string, header http.Header) (*http.Response, error)

func (*Client) Gzip

func (c *Client) Gzip() *Client

func (*Client) GzipDisable

func (c *Client) GzipDisable() *Client

func (*Client) Post

func (c *Client) Post(rawurl string, data io.Reader) (*http.Response, error)

func (*Client) PostForm

func (c *Client) PostForm(rawurl string, data url.Values) (*http.Response, error)

func (*Client) PostFormJson

func (c *Client) PostFormJson(rawurl string, data []byte) (*http.Response, error)

func (*Client) PostFormJsonWithHeader

func (c *Client) PostFormJsonWithHeader(rawurl string, header http.Header, data []byte) (*http.Response, error)

func (*Client) PostFormWithHeader

func (c *Client) PostFormWithHeader(rawurl string, header http.Header, data url.Values) (*http.Response, error)

func (*Client) PostJson

func (c *Client) PostJson(rawurl string, data []byte) (*http.Response, error)

func (*Client) PostJsonWithHeader

func (c *Client) PostJsonWithHeader(rawurl string, header http.Header, data []byte) (*http.Response, error)

func (*Client) PostMultipart

func (c *Client) PostMultipart(rawurl string, data map[string][]string) (resp *http.Response, err error)

func (*Client) PostMultipartWithHeader

func (c *Client) PostMultipartWithHeader(rawurl string, header http.Header, data map[string][]string) (resp *http.Response, err error)

func (*Client) PostWithHeader

func (c *Client) PostWithHeader(rawurl string, header http.Header, data io.Reader) (*http.Response, error)

func (*Client) Put

func (c *Client) Put(rawurl string, data io.Reader) (*http.Response, error)

func (*Client) PutForm

func (c *Client) PutForm(rawurl string, data url.Values) (*http.Response, error)

func (*Client) PutFormJson

func (c *Client) PutFormJson(rawurl string, data []byte) (*http.Response, error)

func (*Client) PutFormJsonWithHeader

func (c *Client) PutFormJsonWithHeader(rawurl string, header http.Header, data []byte) (*http.Response, error)

func (*Client) PutFormWithHeader

func (c *Client) PutFormWithHeader(rawurl string, header http.Header, data url.Values) (*http.Response, error)

func (*Client) PutJson

func (c *Client) PutJson(rawurl string, data []byte) (*http.Response, error)

func (*Client) PutJsonWithHeader

func (c *Client) PutJsonWithHeader(rawurl string, header http.Header, data []byte) (*http.Response, error)

func (*Client) PutWithHeader

func (c *Client) PutWithHeader(rawurl string, header http.Header, data io.Reader) (*http.Response, error)

Jump to

Keyboard shortcuts

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