mirror of
https://github.com/kerberos-io/onvif.git
synced 2025-10-16 04:40:35 +08:00
21 lines
346 B
Go
21 lines
346 B
Go
package networking
|
|
|
|
import (
|
|
"net/http"
|
|
"bytes"
|
|
"io/ioutil"
|
|
"log"
|
|
)
|
|
|
|
func SendSoap(endpoint, message string) string {
|
|
httpClient := new(http.Client)
|
|
|
|
resp, _ := httpClient.Post(endpoint, "application/soap+xml; charset=utf-8", bytes.NewBufferString(message))
|
|
|
|
b, _ := ioutil.ReadAll(resp.Body)
|
|
|
|
log.Println(string(b))
|
|
|
|
return string(b)
|
|
}
|