Documentation ¶
Index ¶
- type SimpleHttp
- func (sh *SimpleHttp) AddHeader(k string, v string)
- func (sh *SimpleHttp) BuildUrl(url string, values interface{}) string
- func (sh *SimpleHttp) Get(url string) (string, error)
- func (sh *SimpleHttp) GetJson(url string, dst interface{}) error
- func (sh *SimpleHttp) Post(url string, data interface{}) (string, error)
- func (sh *SimpleHttp) PostJson(url string, dst interface{}, parseResponse bool) error
- func (sh *SimpleHttp) PostPriv(url string, data interface{}, method string) (string, error)
- func (sh *SimpleHttp) Put(url string, data interface{}) (string, error)
- func (sh *SimpleHttp) SetBasicAuth(username string, password string)
- func (sh *SimpleHttp) SetBearerAuth(key string)
- func (sh *SimpleHttp) SetCustomCA(cert string) error
- func (sh *SimpleHttp) SkipTLSVerification()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleHttp ¶
type SimpleHttp struct {
// contains filtered or unexported fields
}
func (*SimpleHttp) AddHeader ¶
func (sh *SimpleHttp) AddHeader(k string, v string)
func (*SimpleHttp) BuildUrl ¶
func (sh *SimpleHttp) BuildUrl(url string, values interface{}) string
Use the schema tags to build the url
func (*SimpleHttp) GetJson ¶
func (sh *SimpleHttp) GetJson(url string, dst interface{}) error
func (*SimpleHttp) PostJson ¶
func (sh *SimpleHttp) PostJson(url string, dst interface{}, parseResponse bool) error
func (*SimpleHttp) PostPriv ¶
func (sh *SimpleHttp) PostPriv(url string, data interface{}, method string) (string, error)
func (*SimpleHttp) SetBasicAuth ¶
func (sh *SimpleHttp) SetBasicAuth(username string, password string)
func (*SimpleHttp) SetBearerAuth ¶
func (sh *SimpleHttp) SetBearerAuth(key string)
func (*SimpleHttp) SetCustomCA ¶
func (sh *SimpleHttp) SetCustomCA(cert string) error
func (*SimpleHttp) SkipTLSVerification ¶
func (sh *SimpleHttp) SkipTLSVerification()
Click to show internal directories.
Click to hide internal directories.