Documentation
¶
Index ¶
- Variables
- type RestClient
- func (rc *RestClient) Auth(token string) *RestClient
- func (rc *RestClient) Form(req map[string]string) (code int, err error)
- func (rc *RestClient) FormUrl(req map[string]string) (code int, err error)
- func (rc *RestClient) Get(query map[string]string) (code int, err error)
- func (rc *RestClient) Header(name, value string) *RestClient
- func (rc *RestClient) Path(name ...string) *RestClient
- func (rc *RestClient) Post(payload any) (code int, err error)
- func (rc *RestClient) ResponseJson(respPtr any) *RestClient
Constants ¶
This section is empty.
Variables ¶
View Source
var DebugEnable bool
Functions ¶
This section is empty.
Types ¶
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func NewRest ¶
func NewRest(host string) *RestClient
func (*RestClient) Auth ¶
func (rc *RestClient) Auth(token string) *RestClient
func (*RestClient) FormUrl ¶
func (rc *RestClient) FormUrl(req map[string]string) (code int, err error)
func (*RestClient) Header ¶
func (rc *RestClient) Header(name, value string) *RestClient
func (*RestClient) Path ¶
func (rc *RestClient) Path(name ...string) *RestClient
func (*RestClient) ResponseJson ¶
func (rc *RestClient) ResponseJson(respPtr any) *RestClient
Click to show internal directories.
Click to hide internal directories.