gout icon indicating copy to clipboard operation
gout copied to clipboard

gout 请求如何设置ca证书和basic auth ?

Open luochaovg opened this issue 3 years ago • 3 comments

luochaovg avatar Jun 16 '21 10:06 luochaovg

basic auth因为一些原因, 现在是通过SetHeader接口设置

 SetHeader(gout.H{
            "authorization": "base64的值",
        })

ca证书, 你可以参考 https://stackoverflow.com/questions/38822764/how-to-send-a-https-request-with-a-certificate-golang 自定义一个http.Client给gout.New()接口就行.

guonaihong avatar Jun 17 '21 05:06 guonaihong

如果接口方面有一些想法, 也欢迎提出来讨论下.

guonaihong avatar Jun 17 '21 05:06 guonaihong

我想了下, 这两天新加SetBasicAuth接口, 优化使用感受. @luochaovg 用下最新版本, 已有SetBasicAuth.

guonaihong avatar Jun 17 '21 14:06 guonaihong