mirror of
https://gitee.com/johng/gf
synced 2026-07-04 21:03:13 +08:00
19 lines
320 B
Go
19 lines
320 B
Go
package main
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"fmt"
|
|
"github.com/gogf/gf/g/net/ghttp"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
c := ghttp.NewClient()
|
|
c.Transport = &http.Transport{
|
|
TLSClientConfig : &tls.Config{ InsecureSkipVerify: true},
|
|
}
|
|
r, e := c.Clone().Get("https://127.0.0.1:8199")
|
|
fmt.Println(e)
|
|
fmt.Println(r.StatusCode)
|
|
}
|