diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6918cfc..75edfbe 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,4 @@ better mock code implementation to replace faker TMap[string,T] to TMap[K,V] -optimize src/file \ No newline at end of file +optimize src/file +skip verify ssl https \ No newline at end of file diff --git a/src/ghttp/request.go b/src/ghttp/request.go index 0b9fc70..4a36927 100644 --- a/src/ghttp/request.go +++ b/src/ghttp/request.go @@ -2,6 +2,7 @@ package ghttp import ( "bytes" + "crypto/tls" "encoding/json" "github.com/dreamlu/gt/src/file/fs" "github.com/dreamlu/gt/src/type/cmap" @@ -173,6 +174,14 @@ func (m *Request) Exec() *Response { req.AddCookie(cookie) } + // skip verify ssl https + tc := &tls.Config{ + InsecureSkipVerify: true, + } + m.Client.Transport = &http.Transport{ + TLSClientConfig: tc, + } + resp, err := m.Client.Do(req) if resp != nil { defer resp.Body.Close()