httpclient

package
v0.0.0-...-93b0e25 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AddProxy         = defaultClient.AddProxy
	SetProxyHealthFc = defaultClient.SetProxyHealthFc
	SetVerbose       = defaultClient.SetVerbose
	Get              = defaultClient.Get
	GetWithHeader    = defaultClient.GetWithHeader
	Post             = defaultClient.Post
	PostJSON         = defaultClient.PostJSON
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) AddProxy

func (c *Client) AddProxy(scheme, host string)

func (*Client) Get

func (c *Client) Get(URL string) (resp []byte, err error)

func (*Client) GetWithHeader

func (c *Client) GetWithHeader(URL string, hd http.Header) (resp []byte, err error)

func (*Client) Post

func (c *Client) Post(URL string, hd http.Header, param interface{}, paramNeedEncode bool, body string) (resp []byte, err error)

func (*Client) PostJSON

func (c *Client) PostJSON(URL string, hd http.Header, param interface{}, paramNeedEncode bool, body interface{}) (resp []byte, err error)

func (*Client) SetProxyHealthFc

func (c *Client) SetProxyHealthFc(fc func(*Client, *url.URL) bool)

func (*Client) SetProxyHealthTimeout

func (c *Client) SetProxyHealthTimeout(healthTimeOut int64)

func (*Client) SetVerbose

func (c *Client) SetVerbose(isDebug bool)

type URLValues

type URLValues map[string]string

func ParseQuery

func ParseQuery(query string) (URLValues, error)

Jump to

Keyboard shortcuts

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