Files
onvif/networking/networking.go
George Palanjyan c8e7d4c3c1 Add API
2018-04-05 15:18:28 +03:00

20 lines
341 B
Go

package networking
import (
"net/http"
"bytes"
"io/ioutil"
)
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)
}