Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 11900eeecd |
@@ -2,6 +2,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"crypto/tls"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
@@ -47,7 +48,13 @@ func (c *HttpClient) SendPost(api, url string, data, out any) (any, error) {
|
|||||||
|
|
||||||
func (c *HttpClient) sendRequest(api, url, method string, data any) (*http.Response, error) {
|
func (c *HttpClient) sendRequest(api, url, method string, data any) (*http.Response, error) {
|
||||||
apiUrl := api + url // FIXME
|
apiUrl := api + url // FIXME
|
||||||
client := &http.Client{}
|
|
||||||
|
tr := &http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // FIXME
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create an HTTP client with the custom transport
|
||||||
|
client := &http.Client{Transport: tr} // FIXME
|
||||||
|
|
||||||
json, err := json.Marshal(&data)
|
json, err := json.Marshal(&data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user