Versions in this module Expand all Collapse all v0 v0.0.1 Mar 31, 2023 Changes in this version + const DefaultHttpTimeout + const DefaultTcpConnectionTimeout + func LoadEndpointFromEnv() string + type HttpNotOk struct + Body []byte + RequestId string + Status string + StatusCode int + func NewHttpNotOk(res *http.Response) HttpNotOk + func (e HttpNotOk) Error() string + type RestClient struct + DisableCompression bool + HttpTimeout time.Duration + TcpConnectionTimeout time.Duration + func NewOdpsRestClient(a account.Account, endpoint string) RestClient + func (client *RestClient) Do(req *http.Request) (*http.Response, error) + func (client *RestClient) DoWithModel(req *http.Request, model interface{}) error + func (client *RestClient) DoWithParseFunc(req *http.Request, parseFunc func(res *http.Response) error) error + func (client *RestClient) DoWithParseRes(req *http.Request, parseFunc func(res *http.Response) error) error + func (client *RestClient) DoXmlWithModel(method string, resource string, queryArgs url.Values, bodyModel interface{}, ...) error + func (client *RestClient) DoXmlWithParseFunc(method string, resource string, queryArgs url.Values, bodyModel interface{}, ...) error + func (client *RestClient) DoXmlWithParseRes(method string, resource string, queryArgs url.Values, bodyModel interface{}, ...) error + func (client *RestClient) Endpoint() string + func (client *RestClient) GetWithModel(resource string, queryArgs url.Values, model interface{}) error + func (client *RestClient) GetWithParseFunc(resource string, queryArgs url.Values, ...) error + func (client *RestClient) NewRequest(method, resource string, body io.Reader) (*http.Request, error) + func (client *RestClient) NewRequestWithUrlQuery(method, resource string, body io.Reader, queryArgs url.Values) (*http.Request, error) + func (client *RestClient) PutWithParseFunc(resource string, queryArgs url.Values, body io.Reader, ...) error + func (client *RestClient) SetDefaultProject(projectName string) + func (client *RestClient) SetUserAgent(userAgent string) + func (client *RestClient) UserAgent() string