curl

package
v0.0.0-...-7c4d03a Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxIdleConnections maxIdleConnections
	MaxIdleConnections = 100
	// MaxConnectionIdleTime 连接池中一个连接可以idle的时长
	MaxConnectionIdleTime = 60 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Requests

type Requests struct {
	HTTPClient *http.Client
}

Requests struct

func NewRequests

func NewRequests() *Requests

NewRequests new requests

func (*Requests) RollingCurl

func (r *Requests) RollingCurl(Method string, URLStr string, Header map[string]string, Raw string, RetryTimes int64, data interface{}) (rp Responses, err error)

RollingCurl http请求url

type Responses

type Responses struct {
	Response *http.Response
	Body     string
	Data     interface{}
}

Responses struct

Jump to

Keyboard shortcuts

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