Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanlyCloseBody ¶
func CleanlyCloseBody(body io.ReadCloser)
CleanlyCloseBody avoids sending unnecessary RST_STREAM and PING frames by ensuring the whole body is read before being closed. See https://blog.cloudflare.com/go-and-enhance-your-calm/#reading-bodies-in-go-can-be-unintuitive
Types ¶
type EndpointRequester ¶
type EndpointRequester interface {
SendRequest(ctx context.Context, method string, params interface{}, reply interface{}, options ...Option) error
}
func NewEndpointRequester ¶
func NewEndpointRequester(uri string) EndpointRequester
type Option ¶ added in v1.7.10
type Option func(*Options)
func WithHeader ¶ added in v1.7.10
func WithQueryParam ¶ added in v1.7.10
type Options ¶ added in v1.7.10
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶ added in v1.7.10
func (*Options) QueryParams ¶ added in v1.7.10
Click to show internal directories.
Click to hide internal directories.