go-rest:Go HTTP 客户端库

时间:2021-06-29 02:07:55
【文件属性】:
文件名称:go-rest:Go HTTP 客户端库
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-29 02:07:55
Go 去休息 用于构建更有用的 HTTP 客户端的简单工具包。 在所有 Go 1.0 及更高版本上测试。 入门 package main import "fmt" import "github.com/danryan/go-rest/rest" type githubUser struct { Login string `json:"login"` Name string `json:"name"` } func main () { c , _ := rest . New ( "https://api.github.com" , nil ) c . Header . Set ( "Content-Type" , "application/json" ) c . Header . Set ( "Accept" , "application/json" ) user :
【文件预览】:
go-rest-master
----.travis.yml(48B)
----test.go(540B)
----rest()
--------decoder.go(1KB)
--------encoder.go(1KB)
--------client.go(3KB)
--------util.go(2KB)
----LICENSE(1KB)
----.gitignore(320B)
----README.md(997B)

网友评论