zhttp

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = &http.Client{Timeout: time.Second * 10}

Functions

This section is empty.

Types

type Config

type Config struct {
	Repit int
}

type ZClient

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

func Default

func Default() *ZClient

func New

func New(c *http.Client) *ZClient

func (*ZClient) Do

func (c *ZClient) Do(r *http.Request, try int, sleepDur time.Duration) (resp *http.Response, err error)

func (*ZClient) GetEmpty

func (c *ZClient) GetEmpty(url string) error

func (*ZClient) GetJSON added in v1.0.6

func (c *ZClient) GetJSON(target any, url string) error

Jump to

Keyboard shortcuts

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