mirror of
https://github.com/kerberos-io/onvif.git
synced 2025-10-05 15:56:50 +08:00
External httpClient support
This commit is contained in:
@@ -27,12 +27,15 @@ func readResponse(resp *http.Response) string {
|
||||
|
||||
func main() {
|
||||
//Getting an camera instance
|
||||
dev, err := goonvif.NewDevice("192.168.13.14:80")
|
||||
dev, err := goonvif.NewDevice(goonvif.DeviceParams{
|
||||
Xaddr: "192.168.13.14:80",
|
||||
Username: login,
|
||||
Password: password,
|
||||
HttpClient: new(http.Client),
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
//Authorization
|
||||
dev.Authenticate(login, password)
|
||||
|
||||
//Preparing commands
|
||||
systemDateAndTyme := device.GetSystemDateAndTime{}
|
||||
|
Reference in New Issue
Block a user