Compare commits

..

1 Commits

Author SHA1 Message Date
11900eeecd Fixed req with insecured tls 2025-11-15 21:16:34 +01:00

View File

@@ -2,6 +2,7 @@ package api
import (
"bytes"
"crypto/tls"
"encoding/json"
"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) {
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)
if err != nil {