Documentation
¶
Index ¶
- func AddHttpPrefix(url string) string
- func AddHttpsPrefix(url string) string
- func ClearHttpPrefix(url string) string
- func Download(url string, savePath string, requestTimeout int, proxyAddr string) error
- func Get(url string, body any, requestTimeout int) (string, int, error)
- func GetDomain(url string) string
- func GetFormWithoutBody(url string, requestTimeout int) (string, int, error)
- func GetJson[TReturn any](url string, body any, requestTimeout int) (TReturn, error)
- func NewClient(url string) *client
- func Post(url string, head map[string]any, body any, contentType string, ...) (string, int, error)
- func PostForm(url string, head map[string]any, body any, requestTimeout int) (string, int, error)
- func PostFormWithoutBody(url string, head map[string]any, requestTimeout int) (string, int, error)
- func PostJson[TReturn any](url string, head map[string]any, body any, requestTimeout int) (TReturn, int, error)
- func RequestProxy(methodName string, requestUrl string, head map[string]any, body any, ...) (string, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFormWithoutBody ¶
GetFormWithoutBody http get,application/x-www-form-urlencoded,
func Post ¶
func Post(url string, head map[string]any, body any, contentType string, requestTimeout int) (string, int, error)
Post http post,支持请求超时设置,单位:ms
func PostFormWithoutBody ¶
PostFormWithoutBody http post,application/x-www-form-urlencoded
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.