Added ability to update endpoint when conflicting with existing + processor info

Signed-off-by: David J. Allen <allend@lanl.gov>
This commit is contained in:
David J. Allen 2023-09-28 14:46:21 -06:00
parent 2bfc42a064
commit 54dde2dda6
4 changed files with 130 additions and 37 deletions

View file

@ -2,6 +2,7 @@ package util
import (
"bytes"
"crypto/tls"
"fmt"
"io"
"net/http"
@ -17,7 +18,7 @@ func PathExists(path string) (bool, error) {
}
func MakeRequest(url string, httpMethod string, body []byte, headers map[string]string) (*http.Response, []byte, error) {
// url := getSmdEndpointUrl(endpoint)
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
req, _ := http.NewRequest(httpMethod, url, bytes.NewBuffer(body))
req.Header.Add("User-Agent", "magellan")
for k, v := range headers {