mirror of
https://github.com/kerberos-io/onvif.git
synced 2025-10-06 00:06:52 +08:00
17 lines
345 B
Go
17 lines
345 B
Go
package networking
|
|
|
|
import (
|
|
"bytes"
|
|
"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, err
|
|
}
|
|
|
|
return resp, nil
|
|
}
|