req golang http client

发布时间: 更新时间: 总字数:58 阅读时间:1m 作者: IP属地: 分享 复制网址

req是golang的http client客户端。

示例

package main

import (
	"fmt"

	"github.com/imroc/req"
)

func main() {
	req.Debug = true

	headers := req.Header{
		"content-type": "application/json",
	}

	resp, err := req.Get("https://api.github.com", headers)
	fmt.Println(resp, err, resp.Dump())
}
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数