Documentation ¶
Index ¶
- Variables
- func Get(uri string, header map[string]string) (*http.Response, error, error)
- func GetBytes(uri string, header map[string]string) (code int, buff []byte, err, neterr error)
- func GetUserAgent() string
- func PostData(uri string, header map[string]string, data io.Reader) (*http.Response, error, error)
- func PostForm(uri string, header map[string]string, val url.Values) (*http.Response, error, error)
- func PostJson(uri string, header map[string]string, data interface{}) (*http.Response, error, error)
- func PutJson(uri string, header map[string]string, data interface{}) (*http.Response, error, error)
- func SetProxy(rawurl string) (err error)
- func SetRootCA(file string) (err error)
- func SetSkipVerify(skip bool) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Client = &http.Client{ Timeout: time.Duration(5) * time.Second, CheckRedirect: func(req *http.Request, via []*http.Request) (err error) { if req != nil && via != nil && len(via) > 0 { if len(via) >= 10 { return errors.New("stopped after 10 redirects") } req.Header = via[0].Header } return nil }, }
Functions ¶
func GetUserAgent ¶
func GetUserAgent() string
func SetSkipVerify ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.