Documentation ¶
Index ¶
- Variables
- func GetDownloadFileName(u *url.URL, fileName string, disposition string) string
- func HandleRespon2String(resp *http.Response, err error) (string, error)
- type HttpClient
- func (hc *HttpClient) HttpFormPost(URL string, header map[string]string, postBody map[string]string) (*http.Response, error)
- func (hc *HttpClient) HttpGet(URL string, header map[string]string, params map[string]string) (*http.Response, error)
- func (hc *HttpClient) HttpGetDownloadFile(URL string, fileName string) error
- func (hc *HttpClient) HttpPost(URL string, header map[string]string, postBody string) (*http.Response, error)
- func (hc *HttpClient) HttpRequest(method string, URL string, header map[string]string, postBody string) (*http.Response, error)
- func (hc *HttpClient) HttpSimpleFormPost(URL string, postBody map[string]string) (*http.Response, error)
- func (hc *HttpClient) HttpSimpleGet(URL string) (*http.Response, error)
- func (hc *HttpClient) SetProxy(proxy string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SimpleHttpClient = NewHttpClient()
)
Functions ¶
func GetDownloadFileName ¶
Types ¶
type HttpClient ¶
func NewHttpClient ¶
func NewHttpClient() *HttpClient
func (*HttpClient) HttpFormPost ¶
func (*HttpClient) HttpGetDownloadFile ¶
func (hc *HttpClient) HttpGetDownloadFile(URL string, fileName string) error
func (*HttpClient) HttpRequest ¶
func (*HttpClient) HttpSimpleFormPost ¶
func (*HttpClient) HttpSimpleGet ¶
func (hc *HttpClient) HttpSimpleGet(URL string) (*http.Response, error)
func (*HttpClient) SetProxy ¶
func (hc *HttpClient) SetProxy(proxy string) error
such as http://127.0.0.1:8080 socks5://127.0.0.1:1080
Click to show internal directories.
Click to hide internal directories.