Go 每日一库之 restyhttps://segmentfault.com/a/1190000040247099
- # Go Modules
- require github.com/go-resty/resty/v2 v2.3.0
以下示例将帮助您尽可能舒适地使用resty库。
- // Import resty into your code and refer it as `resty`.
- import "github.com/go-resty/resty/v2"
- // Create a Resty Client
- client := resty.New()
-
- resp, err := client.R().
- EnableTrace().