Documentation ¶
Index ¶
- Constants
- func AcquireRequest() *fasthttp.Request
- func AcquireResponse() *fasthttp.Response
- func Do(req *fasthttp.Request, resp *fasthttp.Response, opts ...HttpClientOption) error
- func DoDeadline(req *fasthttp.Request, resp *fasthttp.Response, deadline time.Time, ...) error
- func DoRedirects(req *fasthttp.Request, resp *fasthttp.Response, maxRedirectsCount int, ...) error
- func DoTimeout(req *fasthttp.Request, resp *fasthttp.Response, timeout time.Duration, ...) error
- func Get(dst []byte, url string, opts ...HttpClientOption) (statusCode int, body []byte, err error)
- func GetDeadline(dst []byte, url string, deadline time.Time, opts ...HttpClientOption) (statusCode int, body []byte, err error)
- func GetTimeout(dst []byte, url string, timeout time.Duration, opts ...HttpClientOption) (statusCode int, body []byte, err error)
- func Post(dst []byte, url string, postArgs *fasthttp.Args, opts ...HttpClientOption) (statusCode int, body []byte, err error)
- func ReleaseRequest(req *fasthttp.Request)
- func ReleaseResponse(resp *fasthttp.Response)
- type Args
- type HttpClientOption
- type HttpClientOptionProc
Constants ¶
View Source
const ( MethodGet = fasthttp.MethodGet // RFC 7231, 4.3.1 MethodHead = fasthttp.MethodHead // RFC 7231, 4.3.2 MethodPost = fasthttp.MethodPost // RFC 7231, 4.3.3 MethodPut = fasthttp.MethodPut // RFC 7231, 4.3.4 MethodPatch = fasthttp.MethodPatch // RFC 5789 MethodDelete = fasthttp.MethodDelete // RFC 7231, 4.3.5 MethodConnect = fasthttp.MethodConnect // RFC 7231, 4.3.6 MethodOptions = fasthttp.MethodOptions // RFC 7231, 4.3.7 MethodTrace = fasthttp.MethodTrace // RFC 7231, 4.3.8 )
Variables ¶
This section is empty.
Functions ¶
func AcquireRequest ¶
func AcquireResponse ¶
func DoDeadline ¶
func DoDeadline(req *fasthttp.Request, resp *fasthttp.Response, deadline time.Time, opts ...HttpClientOption) error
An extenstion method for github.com/valyala/fasthttp.DoDeadline()
func DoRedirects ¶
func DoRedirects(req *fasthttp.Request, resp *fasthttp.Response, maxRedirectsCount int, opts ...HttpClientOption) error
An extenstion method for github.com/valyala/fasthttp.DoRedirects()
func DoTimeout ¶
func DoTimeout(req *fasthttp.Request, resp *fasthttp.Response, timeout time.Duration, opts ...HttpClientOption) error
An extenstion method for github.com/valyala/fasthttp.DoTimeout()
func GetDeadline ¶
func GetDeadline(dst []byte, url string, deadline time.Time, opts ...HttpClientOption) (statusCode int, body []byte, err error)
An extenstion method for github.com/valyala/fasthttp.GetDeadline()
func GetTimeout ¶
func GetTimeout(dst []byte, url string, timeout time.Duration, opts ...HttpClientOption) (statusCode int, body []byte, err error)
An extenstion method for github.com/valyala/fasthttp.GetTimeout()
func Post ¶
func Post(dst []byte, url string, postArgs *fasthttp.Args, opts ...HttpClientOption) (statusCode int, body []byte, err error)
An extenstion method for github.com/valyala/fasthttp.Post()
func ReleaseRequest ¶
func ReleaseResponse ¶
Types ¶
type HttpClientOption ¶
type HttpClientOption interface {
// contains filtered or unexported methods
}
type HttpClientOptionProc ¶
func WithTracePropagation ¶
func WithTracePropagation(ctx context.Context, propagator propagation.TextMapPropagator) HttpClientOptionProc
Click to show internal directories.
Click to hide internal directories.