Skip to content

Commit b2c5426

Browse files
authored
Merge pull request #4 from qurami/feat-tls-insecure-skip-verify
Disable SSL certificate verification
2 parents cf900ab + 0c22618 commit b2c5426

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client.go

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package gojsonrpc
22

33
import (
4+
"crypto/tls"
45
"encoding/json"
56
"errors"
67
"io/ioutil"
@@ -28,6 +29,11 @@ func (this *Client) sendJsonRequest(jsonRequest []byte) ([]byte, error) {
2829

2930
httpClient := &http.Client{
3031
Timeout: time.Duration(time.Duration(this.Timeout) * time.Second),
32+
Transport: &http.Transport{
33+
TLSClientConfig: &tls.Config{
34+
InsecureSkipVerify: true,
35+
},
36+
},
3137
}
3238

3339
httpRequest, err := http.NewRequest("POST", this.Url, strings.NewReader(string(jsonRequest)))

0 commit comments

Comments
 (0)