_http

package
v0.0.0-...-25da3cc Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MaxIdleConns        int = 100
	MaxIdleConnsPerHost int = 50
	IdleConnTimeout     int = 90
	InsecureSkipVerify      = true
)

Variables

This section is empty.

Functions

func GetHttpClient

func GetHttpClient(timeout time.Duration) *http.Client

func GetQuery

func GetQuery(querys url.Values, key string) string

从指定query集合获取指定key的值

Types

type HttpResult

type HttpResult struct {
	Status       string
	Body         string
	ContentType  string
	IntervalTime time.Duration
	Error        error
}

func HttpGet

func HttpGet(url string, timeout time.Duration) *HttpResult

func HttpHead

func HttpHead(url string, timeout time.Duration) *HttpResult

func HttpPost

func HttpPost(url string, postBody string, bodyType string, timeout time.Duration) *HttpResult

Jump to

Keyboard shortcuts

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