httptransport

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client added in v0.0.20

func Client() *http.Client

func Close

func Close()

关闭FastHttpClient

func CreateHttpClient

func CreateHttpClient() *http.Client

func LoadDefaultConfig

func LoadDefaultConfig()

Types

type Config_type

type Config_type struct {
	Timeout               time.Duration
	DialTimeout           time.Duration
	KeepAliveDetectTime   time.Duration
	ResponseHeaderTimeout time.Duration
	TLSHandshakeTimeout   time.Duration
	MaxIdleConns          int
	IdleConnTimeout       time.Duration
	DisableKeepAlives     bool
	MaxIdleConnsPerHost   int
	HttpProxy             *url.URL
	// TLSClient Config
	TLSClientC_InsecureSkipVerify bool
	// HTTP2 config
	HTTP2_ForceAttempt bool
}
var DefaultConfig *Config_type

type HtpCli

type HtpCli struct {
	HtpClient *http.Client
}

func New

func New() *HtpCli

创建FastHttpClient

func (HtpCli) Get

func (f HtpCli) Get(url string, headers map[string]string) (*http.Response, error)

一个get请求

func (HtpCli) Post

func (f HtpCli) Post(data string, url string, headers map[string]string) (*http.Response, error)

一个post请求

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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