mirror of
https://github.com/kerberos-io/onvif.git
synced 2026-08-23 15:08:33 +00:00
fix memory leak and events
This commit is contained in:
@@ -2,12 +2,16 @@ package networking
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/juju/errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/juju/errors"
|
||||
)
|
||||
|
||||
// SendSoap send soap message
|
||||
func SendSoap(httpClient *http.Client, endpoint, message string) (*http.Response, error) {
|
||||
fmt.Printf("SendSoap message:%s\n", message)
|
||||
|
||||
resp, err := httpClient.Post(endpoint, "application/soap+xml; charset=utf-8", bytes.NewBufferString(message))
|
||||
if err != nil {
|
||||
return resp, errors.Annotate(err, "Post")
|
||||
|
||||
Reference in New Issue
Block a user