Documentation
¶
Index ¶
- Variables
- func GenHttpClient(opt *HttpClientOptions) *http.Client
- func Recover() any
- 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 Rand
- type RandWithLetters
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
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
type Rand ¶
type Rand struct {
// contains filtered or unexported fields
}
func (Rand) WithLetters ¶ added in v0.7.4
func (r Rand) WithLetters(letters string) RandWithLetters
type RandWithLetters ¶ added in v0.7.4
type RandWithLetters struct {
Rand
// contains filtered or unexported fields
}
func (RandWithLetters) String ¶ added in v0.7.4
func (r RandWithLetters) String(Len int) string
Click to show internal directories.
Click to hide internal directories.