Documentation ¶
Index ¶
- Variables
- func InitLog()
- func StringTemplate(body string, data interface{}) string
- type Configs
- type Data
- type HttpClient
- func (h *HttpClient) Delete(url string, body interface{}) (*Response, error)
- func (h *HttpClient) Do(method string, route string, body interface{}) (*Response, error)
- func (h *HttpClient) Get(route string, params map[string]string) (*Response, error)
- func (h *HttpClient) Head(url string, body interface{}) (*Response, error)
- func (h *HttpClient) Options(url string, body interface{}) (*Response, error)
- func (h *HttpClient) Patch(url string, body interface{}) (*Response, error)
- func (h *HttpClient) Post(url string, body interface{}) (*Response, error)
- func (h *HttpClient) Put(url string, body interface{}) (*Response, error)
- func (h *HttpClient) WithCookie(key string, value string) *HttpClient
- func (h *HttpClient) WithHeader(key string, value string) *HttpClient
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var UserAgent = "Native_Http_Client/0.5.1"
Functions ¶
func StringTemplate ¶
Types ¶
type HttpClient ¶
type HttpClient struct { Network string Address string Headers map[string]string Cookies map[string]string Request Request Response Response Configs Configs }
func Defaults ¶ added in v0.2.0
func Defaults() *HttpClient
func NewTcp ¶
func NewTcp(link string) *HttpClient
func NewUnixSock ¶
func NewUnixSock(file string) *HttpClient
func (*HttpClient) Delete ¶
func (h *HttpClient) Delete(url string, body interface{}) (*Response, error)
func (*HttpClient) Do ¶
func (h *HttpClient) Do(method string, route string, body interface{}) (*Response, error)
func (*HttpClient) Head ¶
func (h *HttpClient) Head(url string, body interface{}) (*Response, error)
func (*HttpClient) Options ¶
func (h *HttpClient) Options(url string, body interface{}) (*Response, error)
func (*HttpClient) Patch ¶
func (h *HttpClient) Patch(url string, body interface{}) (*Response, error)
func (*HttpClient) Post ¶
func (h *HttpClient) Post(url string, body interface{}) (*Response, error)
func (*HttpClient) WithCookie ¶
func (h *HttpClient) WithCookie(key string, value string) *HttpClient
func (*HttpClient) WithHeader ¶
func (h *HttpClient) WithHeader(key string, value string) *HttpClient
Click to show internal directories.
Click to hide internal directories.