Documentation ¶
Index ¶
- func TimeoutDialer(cTimeout time.Duration) func(ctx context.Context, net, addr string) (c net.Conn, err error)
- type Request
- func (r *Request) Body(data interface{}) *Request
- func (r *Request) Header(key, value string) *Request
- func (r *Request) Param(key, value string) *Request
- func (r *Request) Response() (*http.Response, error)
- func (r *Request) SetContext(ctx context.Context) *Request
- func (r *Request) SetTLSClientConfig(config *tls.Config) *Request
- func (r *Request) SetTimeout(connectTimeout, readWriteTimeout time.Duration) *Request
- func (r *Request) SetTransport(transport http.RoundTripper) *Request
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request provides more useful methods for requesting one url than http.Request.
func NewRequest ¶ added in v1.2.0
NewRequest returns *Request with specific method
func (*Request) Param ¶
Param adds query param in to request. params build query string as ?key1=value1&key2=value2...
func (*Request) SetContext ¶ added in v1.15.0
SetContext sets the request's Context
func (*Request) SetTLSClientConfig ¶
SetTLSClientConfig sets tls connection configurations if visiting https url.
func (*Request) SetTimeout ¶
SetTimeout sets connect time out and read-write time out for BeegoRequest.
func (*Request) SetTransport ¶
func (r *Request) SetTransport(transport http.RoundTripper) *Request
SetTransport sets transport to
Click to show internal directories.
Click to hide internal directories.