18 lines
396 B
Go
18 lines
396 B
Go
package networking
|
|
|
|
import (
|
|
"bytes"
|
|
"github.com/juju/errors"
|
|
"net/http"
|
|
)
|
|
|
|
// SendSoap send soap message
|
|
func SendSoap(httpClient *http.Client, endpoint, message string) (*http.Response, error) {
|
|
resp, err := httpClient.Post(endpoint, "application/soap+xml; charset=utf-8", bytes.NewBufferString(message))
|
|
if err != nil {
|
|
return resp, errors.Annotate(err, "Post")
|
|
}
|
|
|
|
return resp, nil
|
|
}
|