Use environment DialContext and Listen everywhere

This commit is contained in:
Tom Wiesing 2022-09-19 12:42:33 +02:00
parent f19619ef9f
commit b0d3c686ba
No known key found for this signature in database
11 changed files with 64 additions and 30 deletions

View file

@ -6,7 +6,6 @@ import (
"fmt"
"io"
"mime/multipart"
"net"
"net/http"
"github.com/FAU-CDI/wisski-distillery/pkg/logging"
@ -64,10 +63,8 @@ func (ts Triplestore) OpenRaw(method, url string, body interface{}, bodyName str
// create the request object
client := &http.Client{
Transport: &http.Transport{
Dial: ts.Environment.Dial,
DialTLS: func(network, addr string) (net.Conn, error) {
return nil, errors.New("not implemented")
},
DialContext: ts.Environment.DialContext,
DisableKeepAlives: true,
},
}
req, err := http.NewRequest(method, ts.BaseURL+url, reader)