gout v0.1.0 发布,golang 实现的 http 客户端

栏目: 软件资讯 · 发布时间: 5年前

内容简介:项目地址 https://gitee.com/guonaihong/gout https://github.com/guonaihong/gout changlog #226 bench:设置Rate(压测频率),Number和Duration会有误差(pr:#227) #231 明确SetBody, BindBody传递nil指针返回错误...

项目地址

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()
}

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Web Caching

Web Caching

Duane Wessels / O'Reilly Media, Inc. / 2001-6 / 39.95美元

On the World Wide Web, speed and efficiency are vital. Users have little patience for slow web pages, while network administrators want to make the most of their available bandwidth. A properly design......一起来看看 《Web Caching》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具