Documentation ¶
Index ¶
- func Post2Api(url string, data interface{}, token string) (content []byte, err error)
- func Post2ApiForRead(url string, data interface{}, token string) (content []byte, err error)
- func PostWithTimeOut(url string, data interface{}, token string, timeout time.Duration) (content []byte, err error)
- func Str2bytes(s string) []byte
- type HttpCli
- func (c *HttpCli) BodyWithBytes(buf []byte) *HttpCli
- func (c *HttpCli) BodyWithForm(form map[string]string) *HttpCli
- func (c *HttpCli) BodyWithJson(obj interface{}) *HttpCli
- func (c *HttpCli) SetHeader(key, value string) *HttpCli
- func (c *HttpCli) SetTimeOut(timeout time.Duration) *HttpCli
- func (c *HttpCli) ToBytes() (content []byte, err error)
- func (c *HttpCli) ToJson(obj interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Post2ApiForRead ¶
func PostWithTimeOut ¶
Types ¶
type HttpCli ¶
type HttpCli struct { Error error // contains filtered or unexported fields }
func (*HttpCli) BodyWithBytes ¶
func (*HttpCli) BodyWithJson ¶
Click to show internal directories.
Click to hide internal directories.