Documentation ¶
Index ¶
- Constants
- type HttpClient
- func (h *HttpClient) Delete(url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte)
- func (h *HttpClient) Get(url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte)
- func (h *HttpClient) Post(url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte)
- func (h *HttpClient) Put(url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte)
- func (h *HttpClient) Request(method, u string, params []KeyValue, requestBody interface{}, ...) (err error, code int, respBody []byte)
- type IHttpClient
- type KeyValue
Constants ¶
View Source
const ErrorCode = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
func NewHttpClient ¶
func NewHttpClient(transport *http.Transport) *HttpClient
type IHttpClient ¶
type IHttpClient interface { Request(method, url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte) Get(url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte) Post(url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte) Delete(url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte) Put(url string, params []KeyValue, body interface{}, header []KeyValue) (error, int, []byte) }
Click to show internal directories.
Click to hide internal directories.