Versions in this module Expand all Collapse all v0 v0.1.0 Aug 21, 2023 Changes in this version + func WithBaseURL(base string) func(*Helper) + func WithBody(body io.Reader) func(*Request) + func WithContentType(ct string) func(*Request) + func WithHeader(k, v string) func(*Helper) + func WithJSON(v interface{}) func(*Request) + func WithParser(mimeType string, fn Parser) func(*Helper) + func WithQuery(k, v string) func(*Request) + func WithRequestHeader(k, v string) func(*Request) + func WithTimeout(d time.Duration) func(*Helper) + func WithXML(v interface{}) func(*Request) + type Helper struct + func New(opts ...HelperOption) *Helper + func (h *Helper) Delete(path string, opts ...RequestOption) (*Request, error) + func (h *Helper) Get(path string, opts ...RequestOption) (*Request, error) + func (h *Helper) NewRequest(method, path string, opts ...RequestOption) (*Request, error) + func (h *Helper) Patch(path string, opts ...RequestOption) (*Request, error) + func (h *Helper) Post(path string, opts ...RequestOption) (*Request, error) + func (h *Helper) Put(path string, opts ...RequestOption) (*Request, error) + type HelperOption func(*Helper) + type Parser func(interface{}) error + type Request struct + func (r *Request) AddHeader(k, v string) + func (r *Request) AddQuery(k, v string) + func (r *Request) Request() string + func (req *Request) Do() (*Response, error) + type RequestOption func(*Request) + type Response struct + Header http.Header + func (r *Response) BodyBytes() ([]byte, error) + func (r *Response) Close() + func (r *Response) Error() string + func (r *Response) IsOK() bool + func (r *Response) Parse(v interface{}) error + func (r *Response) ParseContentType() string + func (r *Response) ParseJSON(v interface{}) error + func (r *Response) ParseXML(v interface{}) error + func (r *Response) Status() int