# Greq
[![goproxy.cn](https://goproxy.cn/stats/github.com/zhshch2002/goreq/badges/download-count.svg)](https://goproxy.cn)
![Go Test](https://github.com/zhshch2002/goreq/workflows/Go%20Test/badge.svg)
[![codecov](https://codecov.io/gh/zhshch2002/goreq/branch/master/graph/badge.svg)](https://codecov.io/gh/zhshch2002/goreq)
An clean and simple Go HTTP request client library.
一个优雅并简洁的Go HTTP请求库。
```
go get -u github.com/zhshch2002/goreq
```
```go
package main
import (
"fmt"
"github.com/zhshch2002/goreq"
)
func main() {
h, err := greq.Get("https://httpbin.org/").Do().HTML()
if err != nil {
panic(err)
}
fmt.Println(h.Find("title").Text())
}
```
## Feature
* 线程安全
* 自动解码
* 便捷代理设置
* 链式配置请求
* Multipart post support
* HTML、JSON、XML解析
* Middleware | 中间件
* Cache | 缓存
* Retry | 失败重试
* Log | 日志
* Random UserAgent | 随机UA
* Referer | 填充Referer
有疑问加站长微信联系(非本文作者)