httpcli

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 13 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.MIN_PKG_Httpcli
	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 GetClientError

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

func GetClientTimeout

func GetClientTimeout(serverName string, GlobalTimeout, DialTimeOut, DialKeepAlive, IdleConnTimeout, TLSHandshakeTimeout, ExpectContinueTimeout time.Duration) (*http.Client, errors.Error)

func IsCodeError

func IsCodeError() bool

Types

type HTTP

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

func NewClient

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

Jump to

Keyboard shortcuts

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