nats discovery
This commit is contained in:
parent
56f81fb30e
commit
3c54f3d39e
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user