httpx

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenUrlParamsStr

func GenUrlParamsStr(params map[string]string) string

func SetBody

func SetBody(body io.ReadCloser) optsFunc

func SetDeadLine

func SetDeadLine(deadline time.Duration) optsFunc

func SetHeader

func SetHeader(header map[string]string) optsFunc

func SetHttp2

func SetHttp2(version string) optsFunc

默认 1, 如果启用 http2 ,请输入 2

func SetJson

func SetJson(params map[string]interface{}) optsFunc

func SetMethod

func SetMethod(method string) optsFunc

func SetParams

func SetParams(params map[string]string) optsFunc

func SetProxy

func SetProxy(proxy string) optsFunc

Types

type Client

type Client interface {
	Do(string, ...optsFunc) ([]byte, error)
	AddHeader(map[string]string)
	DoTest(api string, optsF ...optsFunc) ([]byte, error)
	// contains filtered or unexported methods
}

func New

func New(optsF ...optsFunc) Client

Jump to

Keyboard shortcuts

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