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

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

查看所有标签

猜你喜欢:

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

具体数学(英文版第2版)

具体数学(英文版第2版)

[美] Ronald L. Graham、Donald E. Knuth、Oren Patashnik / 机械工业出版社 / 2002-8 / 49.00元

This book introduces the mathematics that supports advanced computer Programming and the analysis of algorithms. The primary aim of its well-known authors is to provide a solid and relevant base of ma......一起来看看 《具体数学(英文版第2版)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

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

HEX HSV 互换工具