Files
onvif/networking/networking.go
George Palanjyan c6ad810450 Fix bugs
2018-04-04 22:04:13 +03:00

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)
}