|
|
@ -190,7 +190,16 @@ func (e *expander) expandTemplate(t *common.Template) (*ExpandedTemplate, error)
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
response, err := http.Post(e.getBaseURL(), "application/json", ioutil.NopCloser(bytes.NewReader(j)))
|
|
|
|
reader := ioutil.NopCloser(bytes.NewReader(j))
|
|
|
|
|
|
|
|
request, err := http.NewRequest("POST", e.getBaseURL(), reader)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
request.Header.Set("Content-Type", "application/json")
|
|
|
|
|
|
|
|
request.Header.Set("Accept", "*/*")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
response, err := http.DefaultClient.Do(request)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
e := fmt.Errorf("call failed (%s) with payload:\n%s\n", err, string(j))
|
|
|
|
e := fmt.Errorf("call failed (%s) with payload:\n%s\n", err, string(j))
|
|
|
|
return nil, e
|
|
|
|
return nil, e
|
|
|
|