Documentation ¶
Index ¶
- func ParseQuery(qr map[string]any) string
- type HTTPX
- func (h *HTTPX) GET(u string) (*http.Response, error)
- func (h *HTTPX) GETWithContext(ctx context.Context, u string) (*http.Response, error)
- func (h *HTTPX) POST(url string, data []byte) (*http.Response, error)
- func (h *HTTPX) POSTWithContext(ctx context.Context, url string, data []byte) (*http.Response, error)
- func (h *HTTPX) SetBasicAuth(username, password string) *HTTPX
- func (h *HTTPX) SetHeader(headers map[string]string) *HTTPX
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPX ¶
HTTPX http请求封装
func (*HTTPX) GETWithContext ¶
GETWithContext 发起get请求
func (*HTTPX) POSTWithContext ¶
func (h *HTTPX) POSTWithContext(ctx context.Context, url string, data []byte) (*http.Response, error)
POSTWithContext 发起post请求
Click to show internal directories.
Click to hide internal directories.