Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GetPatternUrl ¶
func (*Config) SetPatternUrl ¶
type HttpTemplate ¶
type HttpTemplate struct { Client *http.Client Encoder func(req any, sa *SingleAttempt) error Decoder func(sa *SingleAttempt) error Report func(err error, sa *SingleAttempt, req, resp any) }
var DefaultTemplate *HttpTemplate = NewHttpTemplate()
func NewHttpTemplate ¶
func NewHttpTemplate() *HttpTemplate
func (*HttpTemplate) Do ¶
func (template *HttpTemplate) Do(req, resp any, sa *SingleAttempt) (err error)
type SingleAttempt ¶
type SingleAttempt struct { Request *http.Request Response *http.Response RespBody []byte Template *HttpTemplate Conf *Config // contains filtered or unexported fields }
func NewSingleAttempt ¶
func NewSingleAttempt(c context.Context, httpMethod, url string, conf *Config) *SingleAttempt
func (*SingleAttempt) GetResponseCode ¶
func (sa *SingleAttempt) GetResponseCode() int
Click to show internal directories.
Click to hide internal directories.