Documentation
¶
Index ¶
- Variables
- func GenHttpClient(opt *HttpClientOptions) *http.Client
- func GenHttpTransport(opt *HttpTransportOptions) *http.Transport
- func RandNum(rand *rand.Rand, Min int, Max int) int
- func RandString(src rand.Source, Len int) string
- func Recover()
- type DoHttpReq
- type Http
- func (a *Http) GenReq(Type string, opt *DoHttpReq) (*http.Request, error)
- func (a *Http) Get(opt *DoHttpReq) (*http.Response, map[string]interface{}, error)
- func (a *Http) GetBytes(opt *DoHttpReq) (*http.Response, []byte, error)
- func (a *Http) GetRequest(opt *DoHttpReq) (*http.Response, error)
- func (a *Http) GetString(opt *DoHttpReq) (*http.Response, string, error)
- func (a *Http) Post(opt *DoHttpReq) (*http.Response, map[string]interface{}, error)
- func (a *Http) PostBytes(opt *DoHttpReq) (*http.Response, []byte, error)
- func (a *Http) PostRequest(opt *DoHttpReq) (*http.Response, error)
- func (a *Http) PostString(opt *DoHttpReq) (*http.Response, string, error)
- func (a *Http) PrepareRequest(Type string, opt *DoHttpReq) (*HttpRequest, error)
- func (*Http) ReadResBodyToByte(i io.ReadCloser) ([]byte, error)
- func (a *Http) ReadResBodyToString(i io.ReadCloser) (string, error)
- func (a *Http) Request(Type string, opt *DoHttpReq) (*http.Response, error)
- func (a *Http) UnMarshalResBodyToMap(i io.ReadCloser) (map[string]interface{}, error)
- type HttpClientOptions
- type HttpRequest
- type HttpTransportOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var Cookie cookie
View Source
var File file
View Source
var Regexp reg
View Source
var Time timE
Functions ¶
func GenHttpClient ¶ added in v0.6.4
func GenHttpClient(opt *HttpClientOptions) *http.Client
func GenHttpTransport ¶ added in v0.6.4
func GenHttpTransport(opt *HttpTransportOptions) *http.Transport
Types ¶
type Http ¶ added in v0.6.4
func NewHttpTool ¶ added in v0.6.4
func (*Http) GetRequest ¶ added in v0.6.4
func (*Http) PostRequest ¶ added in v0.6.4
func (*Http) PostString ¶ added in v0.6.4
func (*Http) PrepareRequest ¶ added in v0.6.4
func (a *Http) PrepareRequest(Type string, opt *DoHttpReq) (*HttpRequest, error)
func (*Http) ReadResBodyToByte ¶ added in v0.6.4
func (*Http) ReadResBodyToByte(i io.ReadCloser) ([]byte, error)
func (*Http) ReadResBodyToString ¶ added in v0.6.4
func (a *Http) ReadResBodyToString(i io.ReadCloser) (string, error)
func (*Http) UnMarshalResBodyToMap ¶ added in v0.6.4
func (a *Http) UnMarshalResBodyToMap(i io.ReadCloser) (map[string]interface{}, error)
type HttpClientOptions ¶ added in v0.6.4
type HttpRequest ¶ added in v0.6.4
Click to show internal directories.
Click to hide internal directories.