httpcli

package
v1.0.37 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptDisableFollowLocation = "DisableFollowLocation"
	OptDisableCompression    = "DisableCompression"
	OptTlsSipVerify          = "TlsSkipVerify"
)

Variables

View Source
var DisableRedirectError = errors.New("Don't redirect!")

Functions

func GenRequest

func GenRequest(method, url string, header map[string]string, data string) (*http.Request, error)

func IsHttps

func IsHttps(url string) bool

Types

type HttpResponse

type HttpResponse struct {
	StatusCode int
	Header     http.Header
	Body       []byte
}

func SendRequest

func SendRequest(req *http.Request, ConnTimeoutMs, RWTimeoutMs int,
	opt map[string]string) (HttpResponse, error)

Jump to

Keyboard shortcuts

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