Documentation
¶
Index ¶
- Constants
- func GetUrlBuild(link string, data map[string]string) string
- func JasonSend(url string, method string, body interface{}) ([]byte, error)
- func JasonSendWithHeader(url string, method string, body interface{}, header map[string]string) ([]byte, error)
- type HttpSend
- func (h *HttpSend) Get() ([]byte, error)
- func (h *HttpSend) GetWithProxy(scheme, host string) ([]byte, error)
- func (h *HttpSend) Post() ([]byte, error)
- func (h *HttpSend) PostWithProxy(scheme, host string) ([]byte, error)
- func (h *HttpSend) SetBody(body interface{})
- func (h *HttpSend) SetHeader(header map[string]string)
- func (h *HttpSend) SetSendType(sendType string)
Constants ¶
View Source
const ( GetMethod = "GET" PostMethod = "POST" SendtypeFrom = "from" SendtypeJson = "json" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpSend ¶
type HttpSend struct {
Link string
SendType string
Header map[string]string
Body interface{}
Client http.Client
sync.RWMutex
}
func NewHttpSend ¶
func (*HttpSend) GetWithProxy ¶
func (*HttpSend) PostWithProxy ¶
func (*HttpSend) SetSendType ¶
Click to show internal directories.
Click to hide internal directories.