reqKit

package
v3.0.909 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MinTimeout 最小超时时间
	MinTimeout = time.Second * 3

	// DefaultTimeout 默认超时时间
	DefaultTimeout = time.Second * 30
)

Variables

View Source
var (
	NewLogger func(output io.Writer, prefix string, flag int) req.Logger = req.NewLogger

	NewLoggerFromStandardLogger func(l *log.Logger) req.Logger = req.NewLoggerFromStandardLogger
)

Functions

func NewClient

func NewClient(options ...ClientOption) (client *req.Client)

Types

type ClientOption added in v3.0.909

type ClientOption func(*clientOptions)

func WithInsecureSkipVerify added in v3.0.909

func WithInsecureSkipVerify(insecureSkipVerify bool) ClientOption

func WithLogger added in v3.0.909

func WithLogger(logger req.Logger) ClientOption

func WithTimeout added in v3.0.909

func WithTimeout(timeout time.Duration) ClientOption

Jump to

Keyboard shortcuts

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