歡迎您光臨本站 註冊首頁

gout v0.1.0 釋出,golang 實現的 http 客戶端

←手機掃碼閱讀     admin @ 2020-07-13 , reply:0

專案地址

https://gitee.com/guonaihong/gout

https://github.com/guonaihong/gout

changlog

  • #226 bench:設定Rate(壓測頻率),Number和Duration會有誤差(pr:#227)
  • #231 明確SetBody, BindBody傳遞nil指標返回錯誤(pr:#232)
  • #235 請求中介軟體設計(pr: #236)
  • #234 新增gzip壓縮請求body功能
  • #233 開啟debug模式,http.Header資料裡面有%號效果優化(pr: #239)

重要特性(加入請求中介軟體設計)

請求中介軟體地址

https://github.com/antlabs/gout-middleware

請求中介軟體example

  • 請求body使用gzip壓縮

 import (
         "github.com/antlabs/gout-middleware/request"
         "github.com/guonaihong/gout"
 )
 
 func main() {
         gout.POST(":6666/compress").
                 RequestUse(request.GzipCompress()).
                 SetBody("hello world").
                 Do()
 }

[admin ]

來源:OsChina
連結:https://www.oschina.net/news/117153/gout-0-1-released
gout v0.1.0 釋出,golang 實現的 http 客戶端已經有69次圍觀

http://coctec.com/news/all/show-post-242851.html