nats discovery

This commit is contained in:
mr 2024-10-17 17:04:09 +02:00
parent 56f81fb30e
commit 3c54f3d39e

View File

@ -77,7 +77,7 @@ func (caller *HTTPCaller) CallPost(url string, subpath string, body map[string]i
postBody, _ := json.Marshal(body) postBody, _ := json.Marshal(body)
responseBody := bytes.NewBuffer(postBody) responseBody := bytes.NewBuffer(postBody)
resp, err := http.Post(url+subpath, "application/json", responseBody) resp, err := http.Post(url+subpath, "application/json", responseBody)
if err != nil { if err != nil || resp == nil || resp.Body == nil {
return nil, err return nil, err
} }
defer resp.Body.Close() defer resp.Body.Close()