【文件属性】:
文件名称:go-httpclient:用于golang的高级HTTP客户端
文件大小:17KB
文件格式:ZIP
更新时间:2021-02-03 14:31:59
go golang http curl httpclient
去http客户端
用于golang的高级HTTP客户端。
产品特点
可链接的API
直接上传文件
超时
HTTP代理
曲奇饼
邮编
重定向政策
取消(有上下文)
安装
go get github.com/ddliu/go-httpclient
快速开始
package main
import (
"github.com/ddliu/go-httpclient"
)
func main () {
httpclient . Defaults (httpclient. Map {
httpclient . OPT_USERAGENT : "my awsome httpclient" ,
"Accept-Language" : "en-us" ,
})
res , err := httpclient . Get ( "http://google.com/search" , map [ string ] string {
"q" : "news" ,
})
println ( res . Stat
【文件预览】:
go-httpclient-master
----.travis.yml(35B)
----example()
--------main.go(825B)
----error.go(1KB)
----default_client.go(1KB)
----LICENSE(1KB)
----httpclient_test.go(15KB)
----default_client_test.go(331B)
----CHANGELOG.md(992B)
----README.md(6KB)
----util.go(4KB)
----httpclient.go(19KB)
----go.mod(47B)