Documentation ¶
Index ¶
Constants ¶
View Source
const ( GET HttpMethod = http.MethodGet POST = http.MethodPost PUT = http.MethodPut PATCH = http.MethodPatch DELETE = http.MethodDelete )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Url *template.UrlTemplate `yaml:"url"` Method HttpMethod `yaml:"method"` Body *template.Template `yaml:"body"` Headers map[string]*template.Template `yaml:"headers"` ResponseChecker *responseChecker `yaml:"responses"` Follow bool `default:"true" yaml:"followRedirects"` Transport *http.Transport `yaml:"transport"` // contains filtered or unexported fields }
func (*Client) MakeRequest ¶
func (*Client) UnmarshalYAML ¶
type HttpMethod ¶
type HttpMethod string
func (HttpMethod) String ¶
func (hm HttpMethod) String() string
func (*HttpMethod) UnmarshalYAML ¶
func (hm *HttpMethod) UnmarshalYAML(unmarshal func(interface{}) error) error
type RequestResult ¶
type RequestResult string
const ( Success RequestResult = "success" Error RequestResult = "error" Fatal RequestResult = "fatal" )
func RequestResultFromError ¶
func RequestResultFromError(err error) (RequestResult, bool)
func (RequestResult) String ¶
func (rt RequestResult) String() string
func (RequestResult) ToError ¶
func (rt RequestResult) ToError() error
func (*RequestResult) UnmarshalYAML ¶
func (rt *RequestResult) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.