hertz

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 10 * time.Second
	ContentType    = "Content-Type"
	RequestTimeOut = 5 * time.Minute
	WriteTimeout   = RequestTimeOut
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HertzHttpClient

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

func GetDefaultClient

func GetDefaultClient() HertzHttpClient

func (HertzHttpClient) CheckRetry

func (HertzHttpClient) CheckRetry(err error, status int) bool

func (HertzHttpClient) Exec

func (hhc HertzHttpClient) Exec(req *request.Request) (r *gResp.Response, err error)

func (HertzHttpClient) Proxy

func (hhc HertzHttpClient) Proxy(targetUrl string, ctx *app.RequestContext, timeout time.Duration) error

func (*HertzHttpClient) SetClient

func (hhc *HertzHttpClient) SetClient(c *client.Client)

Jump to

Keyboard shortcuts

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