Versions in this module Expand all Collapse all v1 v1.0.0 Mar 24, 2023 Changes in this version + const ContentTypeForm + const ContentTypeJson + const ContentTypeMultipart + const ContentTypeOctet + const ContentTypeTexthtml + const ContentTypeTextxml + const ContentTypeXml + const DefaultTimeout + const TraceIdHeader + func Map2XML(m map[string]string, rootName ...string) ([]byte, error) + type DefaultLogger struct + func NewDefaultLogger() *DefaultLogger + func (l DefaultLogger) Printf(format string, values ...interface{}) + type JsonRpcReqDto struct + Id interface{} + Jsonrpc string + Method string + Params interface{} + func NewJsonRpcReqDto() JsonRpcReqDto + type JsonRpcRespDto struct + Error *json.RawMessage + Id interface{} + Jsonrpc string + Result *json.RawMessage + type MyXmldata struct + Data map[string]string + XMLName xml.Name + func (m MyXmldata) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type Options struct + Cookies interface{} + Debug bool + FormParams map[string]interface{} + Headers map[string]interface{} + JSON interface{} + Log WriterLogger + Proxy string + Query interface{} + Timeout time.Duration + XML interface{} + func NewOptions() Options + type RPCError struct + Code int + Data interface{} + Message string + type Request struct + func NewClient() *Request + func (r *Request) Delete(uri string, opts ...Options) (*Response, error) + func (r *Request) Get(uri string, opts ...Options) (*Response, error) + func (r *Request) GetOptions() Options + func (r *Request) Logf(format string, param ...interface{}) + func (r *Request) Options(uri string, opts ...Options) (*Response, error) + func (r *Request) Patch(uri string, opts ...Options) (*Response, error) + func (r *Request) Post(uri string, opts ...Options) (*Response, error) + func (r *Request) Put(uri string, opts ...Options) (*Response, error) + func (r *Request) Request(method, uri string, opts ...Options) (*Response, error) + func (r *Request) SetOptions(o Options) + type Response struct + func Delete(uri string, opts ...Options) (*Response, error) + func Get(uri string, opts ...Options) (*Response, error) + func Patch(uri string, opts ...Options) (*Response, error) + func Post(uri string, opts ...Options) (*Response, error) + func Put(uri string, opts ...Options) (*Response, error) + func (me *Response) GetBody() (ResponseBody, error) + func (me *Response) GetHeader(name string) string + func (me *Response) GetHeaderSlice(name string) []string + func (me *Response) GetHeaders() map[string][]string + func (me *Response) GetRequest() *http.Request + func (me *Response) GetStatusCode() int + func (me *Response) HasHeader(name string) bool + func (me *Response) IsTimeout() bool + type ResponseBody []byte + func (me ResponseBody) GetContents() string + func (me ResponseBody) String() string + func (me ResponseBody) ToByte() []byte + func (me ResponseBody) ToString() string + type Wg struct + func NewWg() *Wg + func (w *Wg) RunApi(ctx1 context.Context, callback func(ctx2 context.Context)) + type WriterLogger interface + Printf func(string, ...interface{})