Versions in this module Expand all Collapse all v1 v1.0.8 Jul 8, 2022 Changes in this version + var ErrBadRequest = errors.New("bad request") + func GetExternalIP() (string, error) + type BaseAPI struct + Headers map[string]string + Host string + RetryCount int + RetrySleepSecond int + URLPrefix string + func (s *BaseAPI) Delete(uri string, params map[string]string, headers map[string]string, ...) (*Response, error) + func (s *BaseAPI) Get(uri string, params map[string]string, headers map[string]string) (*Response, error) + func (s *BaseAPI) Post(uri string, params map[string]string, headers map[string]string, ...) (*Response, error) + func (s *BaseAPI) Put(uri string, params map[string]string, headers map[string]string, ...) (*Response, error) + func (s *BaseAPI) Request(req *RequestForm) (*Response, error) + func (s *BaseAPI) RequestWithRetry(r *RequestForm) (*Response, error) + type RequestForm struct + Data interface{} + Headers map[string]string + Method string + Params map[string]string + URI string + URL string + type Response struct + Content []byte + Status int + func (r *Response) ToJSON() map[string]interface{}