Go的HTTP客户端-Golang开发

时间:2021-05-26 17:52:06
【文件属性】:
文件名称:Go的HTTP客户端-Golang开发
文件大小:8KB
文件格式:ZIP
更新时间:2021-05-26 17:52:06
Golang Networking gohttp用于Go的HTTP客户端,它还支持异步请求安装go get github.com/nahid/gohttp示例POST https://httpbin.org/post包主要导入(“ github.com/nahi gohttp用于Go的HTTP客户端,支持异步请求安装go get github.com/nahid/gohttp示例POST https://httpbin.org/post包main import(“ github.com/nahid/gohttp”“ fmt”)func main(){req:= gohttp .NewRequest()resp,err:= req。FormData(map [string] string {“ name”:“ Nahid”})。Post(“ https://httpbin.org/post”)如果err!= nil {恐慌(err)}如果resp.GetStatusCode()== 200 {var resps map [string] interface {} _ = resp.GetBodyWithUnmarsh
【文件预览】:
gohttp-master
----.gitignore(15B)
----go.mod(40B)
----response_test.go(930B)
----response.go(2KB)
----.travis.yml(217B)
----LICENSE(1KB)
----async_requests_test.go(3KB)
----README.md(2KB)
----async_request.go(1KB)
----option.go(853B)
----requests_test.go(2KB)
----request.go(6KB)

网友评论