c5_labsci/zciyon/http.go
2026-01-27 00:52:00 +08:00

34 lines
895 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package zciyon
type CiyHTML interface {
Load(html string) error
Get1(path string, base ...any) any
Gets(path string, base ...any) map[string]any
Next(div any) any
}
type CiyHTTP_Param struct {
Url string
Form string //默认json。multipart/form-data[form] / x-www-form-urlencoded[file] / application/octet-stream[bin]
File string //支持{name}{Rnd}{YMD}
Post string
Header map[string]string
Timeout int
}
type CiyHTTP interface { //HTTP接口Cookie自动处理。
Request(param CiyHTTP_Param) (data string, code int, err error)
Down(param CiyHTTP_Param) (err error)
SetCookie(name string, value string, maxAge int, path string, domain string, secure bool, httpOnly bool)
GetCookie(name string) string
SetProxy(proxy string)
}
func GetAjax(url string, post string) (string, error) {
return "", nil
}
func File_down(url, savepath string, arg ...any) {
}