Documentation ¶
Overview ¶
Package requests Date: 2022/9/6 00:08 Author: Amu Description:
Package requests Date: 2022/9/5 13:42 Author: Amu Description:
Package requests Date: 2022/9/5 10:12 Author: Amu Description:
Package requests Date: 2022/9/8 23:50 Author: Amu Description:
Package requests Date: 2022/9/5 09:54 Author: Amu Description:
Package requests Date: 2022/9/6 00:11 Author: Amu Description:
Package requests Date: 2022/9/1 23:06 Author: Amu Description:
Index ¶
- type Option
- func SetCookies(rc map[string]string) Option
- func SetData(rd map[string]string) Option
- func SetHeaders(rh map[string]string) Option
- func SetIdleConnTimeout(ic time.Duration) Option
- func SetJson(rj interface{}) Option
- func SetMaxConns(mc int) Option
- func SetMaxIdle(mi int) Option
- func SetParams(rp map[string]string) Option
- func SetRequestTimeout(rt time.Duration) Option
- type Requests
- type Responses
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(req *Requests)
func SetCookies ¶
func SetHeaders ¶
func SetIdleConnTimeout ¶
func SetMaxConns ¶
func SetMaxIdle ¶
func SetRequestTimeout ¶
type Requests ¶
type Requests struct { // 参数相关 Headers map[string]string // header Cookies map[string]string // cookies Param map[string]string // params Data map[string]string // data Json interface{} // json // request 相关 DialTimeout time.Duration DialKeepAlive time.Duration TLSHandshakeTimeout time.Duration // Client 相关 Timeout time.Duration MaxConnsPerHost int MaxIdleConnsPerHost int IdleConnTimeout time.Duration }
func NewRequests ¶
func NewRequests() *Requests
Click to show internal directories.
Click to hide internal directories.