http和https网页均可适用
go get github.com/xingcxb/goKit
package main
import(
"fmt"
"github.com/xingcxb/goKit/core/httpKit"
)
func main() {
/// get请求
// 白名单认证
fmt.Println(httpKit.HttpProxyGet("https://cip.cc", "22.33.44.55:59582"))
fmt.Println("------------------>")
// 用户名密码认证
fmt.Println(httpKit.HttpProxyGetFull("https://cip.cc", nil, nil,
"", 300, "http", "username", "password",
"22.3.44.55:9582"))
fmt.Println("------------------>")
/// post请求
// 白名单认证
fmt.Println(httpKit.HttpProxyPost("https://cip.cc", nil, "22.33.44.55:59582"))
fmt.Println("------------------>")
// 用户名密码认证
fmt.Println(httpKit.HttpProxyPostFull("https://cip.cc", nil, nil,
"", 300, "http", "username", "password", "22.33.44.55:59582"))
}
评论 (0)