httpcli

package
v1.8.10 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIMEOUT_30_SEC = 30 * time.Second
	TIMEOUT_10_SEC = 10 * time.Second
	TIMEOUT_5_SEC  = 5 * time.Second
	TIMEOUT_1_SEC  = 1 * time.Second
)
View Source
const (
	EMPTY_PARAMS errors.CodeError = iota + errors.MinPkgHttpCli
	URL_PARSE
	HTTP_CLIENT
	HTTP_REQUEST
	HTTP_DO
	IO_READ
	BUFFER_WRITE
	HTTP2_CONFIGURE
)

Variables

This section is empty.

Functions

func GetClient

func GetClient(serverName string) *http.Client

func GetClientCustom added in v1.4.5

func GetClientCustom(tr *http.Transport, http2Tr bool, GlobalTimeout time.Duration) (*http.Client, errors.Error)

func GetClientError

func GetClientError(serverName string) (*http.Client, errors.Error)

func GetClientTimeout

func GetClientTimeout(serverName string, http2Tr bool, GlobalTimeout time.Duration) (*http.Client, errors.Error)

func IsCodeError

func IsCodeError() bool

Types

type HTTP

type HTTP interface {
	SetContext(ctx context.Context)
	Check() liberr.Error
	Call(file *bytes.Buffer) (bool, *bytes.Buffer, liberr.Error)
}

func NewClient

func NewClient(uri string) (HTTP, liberr.Error)

Jump to

Keyboard shortcuts

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